Skip to content

Commit 2cc04c4

Browse files
committed
negative cuke scenarios
1 parent 0ce76d0 commit 2cc04c4

File tree

2 files changed

+35
-2
lines changed

2 files changed

+35
-2
lines changed

Rakefile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,13 @@ require "rspec/core/rake_task"
33
require "cucumber/rake/task"
44

55
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
79

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]
915
task :default => :test

features/equivalence.feature

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,33 @@ Feature: Equivalence
233233
And the JSON at "updated_at" should be "2011-07-08 02:28:50"
234234

235235
Scenario: Table format
236+
When I get the JSON
237+
Then the JSON should have the following:
238+
| array | ["json","spec"] |
239+
| array/0 | "json" |
240+
| array/1 | "spec" |
241+
| created_at | "2011-07-08 02:27:34" |
242+
| empty_array | [] |
243+
| empty_hash | {} |
244+
| false | false |
245+
| float | 10.0 |
246+
| hash | {"json":"spec"} |
247+
| hash/json | "spec" |
248+
| id | 1 |
249+
| integer | 10 |
250+
| negative | -10 |
251+
| null | null |
252+
| string | "json_spec" |
253+
| true | true |
254+
| updated_at | "2011-07-08 02:28:50" |
255+
And the JSON at "array" should have the following:
256+
| 0 | "json" |
257+
| 1 | "spec" |
258+
And the JSON at "hash" should have the following:
259+
| json | "spec" |
260+
261+
@fail
262+
Scenario: Table format can fail equivalence
236263
When I get the JSON
237264
Then the JSON should have the following:
238265
| array | ["bad","garbage"] |

0 commit comments

Comments
 (0)