shoulda-matchers 1.1.0 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. data/.travis.yml +5 -0
  2. data/Appraisals +6 -0
  3. data/Gemfile.lock +15 -15
  4. data/NEWS.md +20 -1
  5. data/README.md +6 -1
  6. data/features/step_definitions/rails_steps.rb +3 -3
  7. data/gemfiles/3.0.gemfile.lock +23 -27
  8. data/gemfiles/3.1.gemfile.lock +26 -30
  9. data/gemfiles/3.2.gemfile +16 -0
  10. data/gemfiles/3.2.gemfile.lock +157 -0
  11. data/lib/shoulda/matchers/action_controller/assign_to_matcher.rb +46 -29
  12. data/lib/shoulda/matchers/action_controller/render_with_layout_matcher.rb +6 -2
  13. data/lib/shoulda/matchers/action_controller/respond_with_content_type_matcher.rb +12 -7
  14. data/lib/shoulda/matchers/action_controller/set_the_flash_matcher.rb +28 -15
  15. data/lib/shoulda/matchers/action_mailer/have_sent_email_matcher.rb +1 -1
  16. data/lib/shoulda/matchers/active_model/allow_mass_assignment_of_matcher.rb +13 -9
  17. data/lib/shoulda/matchers/active_model/allow_value_matcher.rb +9 -8
  18. data/lib/shoulda/matchers/active_model/ensure_exclusion_of_matcher.rb +8 -6
  19. data/lib/shoulda/matchers/active_model/ensure_inclusion_of_matcher.rb +63 -8
  20. data/lib/shoulda/matchers/active_model/ensure_length_of_matcher.rb +67 -34
  21. data/lib/shoulda/matchers/active_model/validate_acceptance_of_matcher.rb +3 -3
  22. data/lib/shoulda/matchers/active_model/validate_numericality_of_matcher.rb +9 -5
  23. data/lib/shoulda/matchers/active_model/validate_presence_of_matcher.rb +6 -3
  24. data/lib/shoulda/matchers/active_model/validate_uniqueness_of_matcher.rb +27 -23
  25. data/lib/shoulda/matchers/active_record/accept_nested_attributes_for_matcher.rb +38 -25
  26. data/lib/shoulda/matchers/active_record/association_matcher.rb +49 -33
  27. data/lib/shoulda/matchers/active_record/have_db_column_matcher.rb +42 -35
  28. data/lib/shoulda/matchers/active_record/have_db_index_matcher.rb +15 -13
  29. data/lib/shoulda/matchers/active_record/query_the_database_matcher.rb +24 -23
  30. data/lib/shoulda/matchers/active_record/serialize_matcher.rb +13 -12
  31. data/lib/shoulda/matchers/version.rb +1 -1
  32. data/shoulda-matchers.gemspec +1 -1
  33. data/spec/shoulda/action_controller/assign_to_matcher_spec.rb +5 -3
  34. data/spec/shoulda/action_mailer/have_sent_email_spec.rb +40 -0
  35. data/spec/shoulda/active_model/allow_mass_assignment_of_matcher_spec.rb +12 -10
  36. data/spec/shoulda/active_model/ensure_inclusion_of_matcher_spec.rb +52 -0
  37. data/spec/shoulda/active_model/helpers_spec.rb +35 -6
  38. data/spec/shoulda/active_model/validate_presence_of_matcher_spec.rb +0 -1
  39. data/spec/shoulda/active_model/validate_uniqueness_of_matcher_spec.rb +8 -1
  40. data/spec/shoulda/active_record/serialize_matcher_spec.rb +1 -1
  41. data/spec/support/active_model_versions.rb +9 -0
  42. data/spec/support/model_builder.rb +15 -7
  43. metadata +123 -128
metadata CHANGED
@@ -1,15 +1,10 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: shoulda-matchers
3
- version: !ruby/object:Gem::Version
4
- hash: 19
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.2.0
5
5
  prerelease:
6
- segments:
7
- - 1
8
- - 1
9
- - 0
10
- version: 1.1.0
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Tammer Saleh
14
9
  - Joe Ferris
15
10
  - Ryan McGeary
@@ -19,159 +14,158 @@ authors:
19
14
  autorequire:
20
15
  bindir: bin
21
16
  cert_chain: []
22
-
23
- date: 2012-04-13 00:00:00 Z
24
- dependencies:
25
- - !ruby/object:Gem::Dependency
17
+ date: 2012-06-14 00:00:00.000000000 Z
18
+ dependencies:
19
+ - !ruby/object:Gem::Dependency
26
20
  name: activesupport
27
- version_requirements: &id001 !ruby/object:Gem::Requirement
21
+ requirement: !ruby/object:Gem::Requirement
28
22
  none: false
29
- requirements:
30
- - - ">="
31
- - !ruby/object:Gem::Version
32
- hash: 7
33
- segments:
34
- - 3
35
- - 0
36
- - 0
23
+ requirements:
24
+ - - ! '>='
25
+ - !ruby/object:Gem::Version
37
26
  version: 3.0.0
38
27
  type: :runtime
39
28
  prerelease: false
40
- requirement: *id001
41
- - !ruby/object:Gem::Dependency
29
+ version_requirements: !ruby/object:Gem::Requirement
30
+ none: false
31
+ requirements:
32
+ - - ! '>='
33
+ - !ruby/object:Gem::Version
34
+ version: 3.0.0
35
+ - !ruby/object:Gem::Dependency
42
36
  name: appraisal
43
- version_requirements: &id002 !ruby/object:Gem::Requirement
37
+ requirement: !ruby/object:Gem::Requirement
44
38
  none: false
45
- requirements:
39
+ requirements:
46
40
  - - ~>
47
- - !ruby/object:Gem::Version
48
- hash: 15
49
- segments:
50
- - 0
51
- - 4
52
- - 0
41
+ - !ruby/object:Gem::Version
53
42
  version: 0.4.0
54
43
  type: :development
55
44
  prerelease: false
56
- requirement: *id002
57
- - !ruby/object:Gem::Dependency
45
+ version_requirements: !ruby/object:Gem::Requirement
46
+ none: false
47
+ requirements:
48
+ - - ~>
49
+ - !ruby/object:Gem::Version
50
+ version: 0.4.0
51
+ - !ruby/object:Gem::Dependency
58
52
  name: aruba
59
- version_requirements: &id003 !ruby/object:Gem::Requirement
53
+ requirement: !ruby/object:Gem::Requirement
60
54
  none: false
61
- requirements:
62
- - - ">="
63
- - !ruby/object:Gem::Version
64
- hash: 3
65
- segments:
66
- - 0
67
- version: "0"
55
+ requirements:
56
+ - - ! '>='
57
+ - !ruby/object:Gem::Version
58
+ version: '0'
68
59
  type: :development
69
60
  prerelease: false
70
- requirement: *id003
71
- - !ruby/object:Gem::Dependency
61
+ version_requirements: !ruby/object:Gem::Requirement
62
+ none: false
63
+ requirements:
64
+ - - ! '>='
65
+ - !ruby/object:Gem::Version
66
+ version: '0'
67
+ - !ruby/object:Gem::Dependency
72
68
  name: bourne
73
- version_requirements: &id004 !ruby/object:Gem::Requirement
69
+ requirement: !ruby/object:Gem::Requirement
74
70
  none: false
75
- requirements:
71
+ requirements:
76
72
  - - ~>
77
- - !ruby/object:Gem::Version
78
- hash: 23
79
- segments:
80
- - 1
81
- - 1
82
- - 2
73
+ - !ruby/object:Gem::Version
83
74
  version: 1.1.2
84
75
  type: :development
85
76
  prerelease: false
86
- requirement: *id004
87
- - !ruby/object:Gem::Dependency
77
+ version_requirements: !ruby/object:Gem::Requirement
78
+ none: false
79
+ requirements:
80
+ - - ~>
81
+ - !ruby/object:Gem::Version
82
+ version: 1.1.2
83
+ - !ruby/object:Gem::Dependency
88
84
  name: bundler
89
- version_requirements: &id005 !ruby/object:Gem::Requirement
85
+ requirement: !ruby/object:Gem::Requirement
90
86
  none: false
91
- requirements:
87
+ requirements:
92
88
  - - ~>
93
- - !ruby/object:Gem::Version
94
- hash: 19
95
- segments:
96
- - 1
97
- - 1
98
- - 0
89
+ - !ruby/object:Gem::Version
99
90
  version: 1.1.0
100
91
  type: :development
101
92
  prerelease: false
102
- requirement: *id005
103
- - !ruby/object:Gem::Dependency
93
+ version_requirements: !ruby/object:Gem::Requirement
94
+ none: false
95
+ requirements:
96
+ - - ~>
97
+ - !ruby/object:Gem::Version
98
+ version: 1.1.0
99
+ - !ruby/object:Gem::Dependency
104
100
  name: cucumber
105
- version_requirements: &id006 !ruby/object:Gem::Requirement
101
+ requirement: !ruby/object:Gem::Requirement
106
102
  none: false
107
- requirements:
103
+ requirements:
108
104
  - - ~>
109
- - !ruby/object:Gem::Version
110
- hash: 1
111
- segments:
112
- - 1
113
- - 1
114
- - 9
105
+ - !ruby/object:Gem::Version
115
106
  version: 1.1.9
116
107
  type: :development
117
108
  prerelease: false
118
- requirement: *id006
119
- - !ruby/object:Gem::Dependency
109
+ version_requirements: !ruby/object:Gem::Requirement
110
+ none: false
111
+ requirements:
112
+ - - ~>
113
+ - !ruby/object:Gem::Version
114
+ version: 1.1.9
115
+ - !ruby/object:Gem::Dependency
120
116
  name: rails
121
- version_requirements: &id007 !ruby/object:Gem::Requirement
117
+ requirement: !ruby/object:Gem::Requirement
122
118
  none: false
123
- requirements:
119
+ requirements:
124
120
  - - ~>
125
- - !ruby/object:Gem::Version
126
- hash: 7
127
- segments:
128
- - 3
129
- - 0
130
- version: "3.0"
121
+ - !ruby/object:Gem::Version
122
+ version: '3.0'
131
123
  type: :development
132
124
  prerelease: false
133
- requirement: *id007
134
- - !ruby/object:Gem::Dependency
125
+ version_requirements: !ruby/object:Gem::Requirement
126
+ none: false
127
+ requirements:
128
+ - - ~>
129
+ - !ruby/object:Gem::Version
130
+ version: '3.0'
131
+ - !ruby/object:Gem::Dependency
135
132
  name: rake
136
- version_requirements: &id008 !ruby/object:Gem::Requirement
133
+ requirement: !ruby/object:Gem::Requirement
137
134
  none: false
138
- requirements:
135
+ requirements:
139
136
  - - ~>
140
- - !ruby/object:Gem::Version
141
- hash: 63
142
- segments:
143
- - 0
144
- - 9
145
- - 2
137
+ - !ruby/object:Gem::Version
146
138
  version: 0.9.2
147
139
  type: :development
148
140
  prerelease: false
149
- requirement: *id008
150
- - !ruby/object:Gem::Dependency
141
+ version_requirements: !ruby/object:Gem::Requirement
142
+ none: false
143
+ requirements:
144
+ - - ~>
145
+ - !ruby/object:Gem::Version
146
+ version: 0.9.2
147
+ - !ruby/object:Gem::Dependency
151
148
  name: rspec-rails
152
- version_requirements: &id009 !ruby/object:Gem::Requirement
149
+ requirement: !ruby/object:Gem::Requirement
153
150
  none: false
154
- requirements:
151
+ requirements:
155
152
  - - ~>
156
- - !ruby/object:Gem::Version
157
- hash: 21
158
- segments:
159
- - 2
160
- - 6
161
- - 1
162
- version: 2.6.1
153
+ - !ruby/object:Gem::Version
154
+ version: 2.8.1
163
155
  type: :development
164
156
  prerelease: false
165
- requirement: *id009
157
+ version_requirements: !ruby/object:Gem::Requirement
158
+ none: false
159
+ requirements:
160
+ - - ~>
161
+ - !ruby/object:Gem::Version
162
+ version: 2.8.1
166
163
  description: Making tests easy on the fingers and eyes
167
164
  email: support@thoughtbot.com
168
165
  executables: []
169
-
170
166
  extensions: []
171
-
172
167
  extra_rdoc_files: []
173
-
174
- files:
168
+ files:
175
169
  - .gitignore
176
170
  - .travis.yml
177
171
  - Appraisals
@@ -189,6 +183,8 @@ files:
189
183
  - gemfiles/3.0.gemfile.lock
190
184
  - gemfiles/3.1.gemfile
191
185
  - gemfiles/3.1.gemfile.lock
186
+ - gemfiles/3.2.gemfile
187
+ - gemfiles/3.2.gemfile.lock
192
188
  - lib/shoulda-matchers.rb
193
189
  - lib/shoulda/matchers.rb
194
190
  - lib/shoulda/matchers/action_controller.rb
@@ -269,41 +265,39 @@ files:
269
265
  - spec/shoulda/active_record/query_the_database_matcher_spec.rb
270
266
  - spec/shoulda/active_record/serialize_matcher_spec.rb
271
267
  - spec/spec_helper.rb
268
+ - spec/support/active_model_versions.rb
272
269
  - spec/support/model_builder.rb
273
270
  homepage: http://thoughtbot.com/community/
274
271
  licenses: []
275
-
276
272
  post_install_message:
277
273
  rdoc_options: []
278
-
279
- require_paths:
274
+ require_paths:
280
275
  - lib
281
- required_ruby_version: !ruby/object:Gem::Requirement
276
+ required_ruby_version: !ruby/object:Gem::Requirement
282
277
  none: false
283
- requirements:
284
- - - ">="
285
- - !ruby/object:Gem::Version
286
- hash: 3
287
- segments:
278
+ requirements:
279
+ - - ! '>='
280
+ - !ruby/object:Gem::Version
281
+ version: '0'
282
+ segments:
288
283
  - 0
289
- version: "0"
290
- required_rubygems_version: !ruby/object:Gem::Requirement
284
+ hash: -2813664721542156285
285
+ required_rubygems_version: !ruby/object:Gem::Requirement
291
286
  none: false
292
- requirements:
293
- - - ">="
294
- - !ruby/object:Gem::Version
295
- hash: 3
296
- segments:
287
+ requirements:
288
+ - - ! '>='
289
+ - !ruby/object:Gem::Version
290
+ version: '0'
291
+ segments:
297
292
  - 0
298
- version: "0"
293
+ hash: -2813664721542156285
299
294
  requirements: []
300
-
301
295
  rubyforge_project:
302
- rubygems_version: 1.8.21
296
+ rubygems_version: 1.8.23
303
297
  signing_key:
304
298
  specification_version: 3
305
299
  summary: Making tests easy on the fingers and eyes
306
- test_files:
300
+ test_files:
307
301
  - features/rails_integration.feature
308
302
  - features/step_definitions/rails_steps.rb
309
303
  - features/support/env.rb
@@ -345,4 +339,5 @@ test_files:
345
339
  - spec/shoulda/active_record/query_the_database_matcher_spec.rb
346
340
  - spec/shoulda/active_record/serialize_matcher_spec.rb
347
341
  - spec/spec_helper.rb
342
+ - spec/support/active_model_versions.rb
348
343
  - spec/support/model_builder.rb