Skip to content

Commit 9c156c1

Browse files
committed
Merge pull request #39 from cbusbey/issue_33
CI changes for Issue 33
2 parents 26c9e8e + 6ad6f5e commit 9c156c1

File tree

3 files changed

+36
-3
lines changed

3 files changed

+36
-3
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
@@ -257,3 +257,30 @@ Feature: Equivalence
257257
| 1 | "spec" |
258258
And the JSON at "hash" should have the following:
259259
| 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" |

lib/json_spec/cucumber.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
end
6060

6161
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|
6363
path = [base, path].compact.join("/")
6464

6565
if value

0 commit comments

Comments
 (0)