json_spec 1.1.0 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ MDEyZjVhZTBmM2M5MTE2ZmRkY2IzMWIwNzRiNzY5ODNiNjE2YjNlZg==
5
+ data.tar.gz: !binary |-
6
+ YzAyNTgzMmE3N2Y4ZjUyZGIwZjM3NGY5ZDlmYTk2MjBlZGIzNTNlZA==
7
+ !binary "U0hBNTEy":
8
+ metadata.gz: !binary |-
9
+ YzA1MDUwZDlmM2Y4MjMzMDMyOGU4OTE2Yjk2Mzk1NjA2NGM5MzYwNmE1ZWE1
10
+ N2U4ZTNkZmVjZGZlZGVmNDYxYTczMDQ1NjdmMTZmODI1NjllMTc5ZjY1YjEx
11
+ MTZhNjA5YTU3MzdmN2NmNWNiMzA4ZTQxYjgwMmQwOGNlOTg3ZGM=
12
+ data.tar.gz: !binary |-
13
+ Y2U3OWY4OTYyNjNiMjU5MTZmNzBlMDNhZTU0ZGE0NGVmMGRhNWEwYWNiMzdj
14
+ YTk2MTVlM2JkNjcxOTliMmVmY2VjNDU1NjcwYmRiNmVhYTQ4YjhmYjY2MDk0
15
+ NTA1MzY1Yzk3ZTFmMGFkZTliOWFlN2RiMTcwMGI5NTk5ZTdmNjA=
@@ -3,3 +3,4 @@ branches: master
3
3
  rvm:
4
4
  - 1.9.2
5
5
  - 1.9.3
6
+ - 2.0.0
data/Gemfile CHANGED
@@ -1,3 +1,8 @@
1
1
  source "https://rubygems.org"
2
2
 
3
3
  gemspec
4
+
5
+ group :test do
6
+ gem "cucumber", "~> 1.1", ">= 1.1.1"
7
+ gem "rake", "~> 10.0"
8
+ end
data/Rakefile CHANGED
@@ -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
@@ -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" |
@@ -2,21 +2,21 @@
2
2
 
3
3
  Gem::Specification.new do |gem|
4
4
  gem.name = "json_spec"
5
- gem.version = "1.1.0"
5
+ gem.version = "1.1.1"
6
6
 
7
7
  gem.authors = ["Steve Richert"]
8
8
  gem.email = ["steve.richert@gmail.com"]
9
9
  gem.summary = "Easily handle JSON in RSpec and Cucumber"
10
- gem.description = gem.summary
10
+ gem.description = "RSpec matchers and Cucumber steps for testing JSON content"
11
11
  gem.homepage = "https://github.com/collectiveidea/json_spec"
12
+ gem.license = "MIT"
12
13
 
13
14
  gem.add_dependency "multi_json", "~> 1.0"
14
15
  gem.add_dependency "rspec", "~> 2.0"
15
16
 
16
- gem.add_development_dependency "cucumber", "~> 1.1", ">= 1.1.1"
17
- gem.add_development_dependency "rake", "~> 0.9"
17
+ gem.add_development_dependency "bundler", "~> 1.0"
18
18
 
19
19
  gem.files = `git ls-files`.split($\)
20
- gem.test_files = gem.files.grep(/^(spec|features)\//)
20
+ gem.test_files = gem.files.grep(/^(features|spec)/)
21
21
  gem.require_paths = ["lib"]
22
22
  end
@@ -59,7 +59,7 @@ Then /^the (?:JSON|json)(?: response)?(?: at "(.*)")? should( not)? include (".*
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
metadata CHANGED
@@ -1,20 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: json_spec
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
5
- prerelease:
4
+ version: 1.1.1
6
5
  platform: ruby
7
6
  authors:
8
7
  - Steve Richert
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2012-11-28 00:00:00.000000000 Z
11
+ date: 2013-03-19 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: multi_json
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
17
  - - ~>
20
18
  - !ruby/object:Gem::Version
@@ -22,7 +20,6 @@ dependencies:
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
24
  - - ~>
28
25
  - !ruby/object:Gem::Version
@@ -30,7 +27,6 @@ dependencies:
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: rspec
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
31
  - - ~>
36
32
  - !ruby/object:Gem::Version
@@ -38,50 +34,25 @@ dependencies:
38
34
  type: :runtime
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
38
  - - ~>
44
39
  - !ruby/object:Gem::Version
45
40
  version: '2.0'
46
41
  - !ruby/object:Gem::Dependency
47
- name: cucumber
42
+ name: bundler
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
45
  - - ~>
52
46
  - !ruby/object:Gem::Version
53
- version: '1.1'
54
- - - ! '>='
55
- - !ruby/object:Gem::Version
56
- version: 1.1.1
57
- type: :development
58
- prerelease: false
59
- version_requirements: !ruby/object:Gem::Requirement
60
- none: false
61
- requirements:
62
- - - ~>
63
- - !ruby/object:Gem::Version
64
- version: '1.1'
65
- - - ! '>='
66
- - !ruby/object:Gem::Version
67
- version: 1.1.1
68
- - !ruby/object:Gem::Dependency
69
- name: rake
70
- requirement: !ruby/object:Gem::Requirement
71
- none: false
72
- requirements:
73
- - - ~>
74
- - !ruby/object:Gem::Version
75
- version: '0.9'
47
+ version: '1.0'
76
48
  type: :development
77
49
  prerelease: false
78
50
  version_requirements: !ruby/object:Gem::Requirement
79
- none: false
80
51
  requirements:
81
52
  - - ~>
82
53
  - !ruby/object:Gem::Version
83
- version: '0.9'
84
- description: Easily handle JSON in RSpec and Cucumber
54
+ version: '1.0'
55
+ description: RSpec matchers and Cucumber steps for testing JSON content
85
56
  email:
86
57
  - steve.richert@gmail.com
87
58
  executables: []
@@ -135,28 +106,28 @@ files:
135
106
  - spec/support/files/project/version/two.json
136
107
  - spec/support/files/two.json
137
108
  homepage: https://github.com/collectiveidea/json_spec
138
- licenses: []
109
+ licenses:
110
+ - MIT
111
+ metadata: {}
139
112
  post_install_message:
140
113
  rdoc_options: []
141
114
  require_paths:
142
115
  - lib
143
116
  required_ruby_version: !ruby/object:Gem::Requirement
144
- none: false
145
117
  requirements:
146
118
  - - ! '>='
147
119
  - !ruby/object:Gem::Version
148
120
  version: '0'
149
121
  required_rubygems_version: !ruby/object:Gem::Requirement
150
- none: false
151
122
  requirements:
152
123
  - - ! '>='
153
124
  - !ruby/object:Gem::Version
154
125
  version: '0'
155
126
  requirements: []
156
127
  rubyforge_project:
157
- rubygems_version: 1.8.24
128
+ rubygems_version: 2.0.3
158
129
  signing_key:
159
- specification_version: 3
130
+ specification_version: 4
160
131
  summary: Easily handle JSON in RSpec and Cucumber
161
132
  test_files:
162
133
  - features/equivalence.feature