File tree Expand file tree Collapse file tree 3 files changed +36
-3
lines changed Expand file tree Collapse file tree 3 files changed +36
-3
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,13 @@ require "rspec/core/rake_task"
3
3
require "cucumber/rake/task"
4
4
5
5
RSpec ::Core ::RakeTask . new ( :spec )
6
- Cucumber ::Rake ::Task . new ( :cucumber )
6
+ Cucumber ::Rake ::Task . new ( :cucumber ) do |t |
7
+ t . cucumber_opts = "--tags ~@fail"
8
+ end
7
9
8
- task :test => [ :spec , :cucumber ]
10
+ Cucumber ::Rake ::Task . new ( :negative_cucumber ) do |t |
11
+ t . cucumber_opts = "--tags @fail --wip"
12
+ end
13
+
14
+ task :test => [ :spec , :cucumber , :negative_cucumber ]
9
15
task :default => :test
Original file line number Diff line number Diff line change @@ -257,3 +257,30 @@ Feature: Equivalence
257
257
| 1 | "spec " |
258
258
And the JSON at "hash" should have the following:
259
259
| json | "spec " |
260
+
261
+ @fail
262
+ Scenario : Table format can fail equivalence
263
+ When I get the JSON
264
+ Then the JSON should have the following:
265
+ | array | ["bad ","garbage "] |
266
+ | array /0 | "json " |
267
+ | array /1 | "spec " |
268
+ | created_at | "2011 -07 -08 02 :27 :34 " |
269
+ | empty_array | [] |
270
+ | empty_hash | {} |
271
+ | false | false |
272
+ | float | 10 .0 |
273
+ | hash | {"json ":"spec "} |
274
+ | hash /json | "spec " |
275
+ | id | 1 |
276
+ | integer | 10 |
277
+ | negative | -10 |
278
+ | null | null |
279
+ | string | "json_spec " |
280
+ | true | true |
281
+ | updated_at | "2011 -07 -08 02 :28 :50 " |
282
+ And the JSON at "array" should have the following:
283
+ | should | "fail " |
284
+ | 1 | "spec " |
285
+ And the JSON at "hash" should have the following:
286
+ | random | "junk " |
Original file line number Diff line number Diff line change 59
59
end
60
60
61
61
Then /^the (?:JSON|json)(?: response)?(?: at "(.*)")? should have the following:$/ do |base , table |
62
- table . rows . each do |path , value |
62
+ table . raw . each do |path , value |
63
63
path = [ base , path ] . compact . join ( "/" )
64
64
65
65
if value
You can’t perform that action at this time.
0 commit comments