mcmire-shoulda-matchers 2.5.0 → 2.6.1.docs.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (103) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/.travis.yml +9 -0
  4. data/.yardopts +2 -1
  5. data/Appraisals +62 -22
  6. data/Gemfile +1 -1
  7. data/Gemfile.lock +3 -3
  8. data/NEWS.md +87 -4
  9. data/README.md +2 -2
  10. data/Rakefile +18 -0
  11. data/features/activemodel_integration.feature +15 -0
  12. data/features/rails_integration.feature +1 -1
  13. data/features/step_definitions/activemodel_steps.rb +21 -0
  14. data/features/step_definitions/rails_steps.rb +5 -4
  15. data/gemfiles/3.0.gemfile +6 -3
  16. data/gemfiles/3.0.gemfile.lock +14 -4
  17. data/gemfiles/3.1.gemfile +10 -4
  18. data/gemfiles/3.1.gemfile.lock +32 -5
  19. data/gemfiles/3.1_1.9.2.gemfile +21 -0
  20. data/gemfiles/3.1_1.9.2.gemfile.lock +191 -0
  21. data/gemfiles/3.2.gemfile +9 -4
  22. data/gemfiles/3.2.gemfile.lock +28 -5
  23. data/gemfiles/4.0.0.gemfile +11 -3
  24. data/gemfiles/4.0.0.gemfile.lock +42 -5
  25. data/gemfiles/4.0.1.gemfile +11 -3
  26. data/gemfiles/4.0.1.gemfile.lock +42 -5
  27. data/gemfiles/4.1.gemfile +37 -0
  28. data/gemfiles/4.1.gemfile.lock +216 -0
  29. data/lib/shoulda/matchers/action_controller/callback_matcher.rb +202 -0
  30. data/lib/shoulda/matchers/action_controller/rescue_from_matcher.rb +1 -1
  31. data/lib/shoulda/matchers/action_controller/set_the_flash_matcher.rb +2 -1
  32. data/lib/shoulda/matchers/action_controller/strong_parameters_matcher.rb +165 -0
  33. data/lib/shoulda/matchers/action_controller.rb +2 -0
  34. data/lib/shoulda/matchers/active_model/allow_value_matcher.rb +26 -4
  35. data/lib/shoulda/matchers/active_model/disallow_value_matcher.rb +6 -0
  36. data/lib/shoulda/matchers/active_model/ensure_exclusion_of_matcher.rb +2 -0
  37. data/lib/shoulda/matchers/active_model/ensure_inclusion_of_matcher.rb +60 -18
  38. data/lib/shoulda/matchers/active_model/errors.rb +43 -1
  39. data/lib/shoulda/matchers/active_model/numericality_matchers/comparison_matcher.rb +14 -3
  40. data/lib/shoulda/matchers/active_model/validate_absence_of_matcher.rb +2 -1
  41. data/lib/shoulda/matchers/active_model/validate_numericality_of_matcher.rb +100 -45
  42. data/lib/shoulda/matchers/active_model/validate_presence_of_matcher.rb +38 -5
  43. data/lib/shoulda/matchers/active_model/validate_uniqueness_of_matcher.rb +27 -20
  44. data/lib/shoulda/matchers/active_record/association_matcher.rb +12 -2
  45. data/lib/shoulda/matchers/active_record/association_matchers/inverse_of_matcher.rb +41 -0
  46. data/lib/shoulda/matchers/active_record/association_matchers/model_reflection.rb +24 -1
  47. data/lib/shoulda/matchers/active_record/association_matchers/model_reflector.rb +1 -1
  48. data/lib/shoulda/matchers/active_record/have_db_index_matcher.rb +1 -1
  49. data/lib/shoulda/matchers/active_record.rb +1 -0
  50. data/lib/shoulda/matchers/assertion_error.rb +8 -3
  51. data/lib/shoulda/matchers/doublespeak/double.rb +75 -0
  52. data/lib/shoulda/matchers/doublespeak/double_collection.rb +55 -0
  53. data/lib/shoulda/matchers/doublespeak/double_implementation_registry.rb +28 -0
  54. data/lib/shoulda/matchers/doublespeak/object_double.rb +33 -0
  55. data/lib/shoulda/matchers/doublespeak/proxy_implementation.rb +31 -0
  56. data/lib/shoulda/matchers/doublespeak/structs.rb +10 -0
  57. data/lib/shoulda/matchers/doublespeak/stub_implementation.rb +35 -0
  58. data/lib/shoulda/matchers/doublespeak/world.rb +39 -0
  59. data/lib/shoulda/matchers/doublespeak.rb +28 -0
  60. data/lib/shoulda/matchers/error.rb +20 -1
  61. data/lib/shoulda/matchers/independent/delegate_matcher/stubbed_target.rb +35 -0
  62. data/lib/shoulda/matchers/independent/delegate_matcher.rb +293 -0
  63. data/lib/shoulda/matchers/independent.rb +10 -0
  64. data/lib/shoulda/matchers/integrations/nunit_test_case_detection.rb +38 -0
  65. data/lib/shoulda/matchers/integrations/rspec.rb +13 -14
  66. data/lib/shoulda/matchers/integrations/test_unit.rb +19 -15
  67. data/lib/shoulda/matchers/integrations.rb +13 -0
  68. data/lib/shoulda/matchers/rails_shim.rb +16 -0
  69. data/lib/shoulda/matchers/version.rb +1 -1
  70. data/lib/shoulda/matchers.rb +15 -3
  71. data/spec/shoulda/matchers/action_controller/callback_matcher_spec.rb +82 -0
  72. data/spec/shoulda/matchers/action_controller/redirect_to_matcher_spec.rb +2 -2
  73. data/spec/shoulda/matchers/action_controller/render_template_matcher_spec.rb +5 -5
  74. data/spec/shoulda/matchers/action_controller/render_with_layout_matcher_spec.rb +4 -4
  75. data/spec/shoulda/matchers/action_controller/rescue_from_matcher_spec.rb +38 -11
  76. data/spec/shoulda/matchers/action_controller/respond_with_matcher_spec.rb +1 -1
  77. data/spec/shoulda/matchers/action_controller/set_session_matcher_spec.rb +1 -1
  78. data/spec/shoulda/matchers/action_controller/set_the_flash_matcher_spec.rb +6 -6
  79. data/spec/shoulda/matchers/action_controller/strong_parameters_matcher_spec.rb +314 -0
  80. data/spec/shoulda/matchers/active_model/allow_value_matcher_spec.rb +32 -0
  81. data/spec/shoulda/matchers/active_model/ensure_inclusion_of_matcher_spec.rb +553 -211
  82. data/spec/shoulda/matchers/active_model/validate_numericality_of_matcher_spec.rb +22 -0
  83. data/spec/shoulda/matchers/active_model/validate_presence_of_matcher_spec.rb +38 -0
  84. data/spec/shoulda/matchers/active_model/validate_uniqueness_of_matcher_spec.rb +42 -36
  85. data/spec/shoulda/matchers/active_record/association_matcher_spec.rb +15 -1
  86. data/spec/shoulda/matchers/active_record/association_matchers/model_reflection_spec.rb +4 -0
  87. data/spec/shoulda/matchers/active_record/have_db_index_matcher_spec.rb +4 -0
  88. data/spec/shoulda/matchers/doublespeak/double_collection_spec.rb +102 -0
  89. data/spec/shoulda/matchers/doublespeak/double_implementation_registry_spec.rb +21 -0
  90. data/spec/shoulda/matchers/doublespeak/double_spec.rb +144 -0
  91. data/spec/shoulda/matchers/doublespeak/object_double_spec.rb +77 -0
  92. data/spec/shoulda/matchers/doublespeak/proxy_implementation_spec.rb +40 -0
  93. data/spec/shoulda/matchers/doublespeak/stub_implementation_spec.rb +88 -0
  94. data/spec/shoulda/matchers/doublespeak/world_spec.rb +88 -0
  95. data/spec/shoulda/matchers/doublespeak_spec.rb +19 -0
  96. data/spec/shoulda/matchers/independent/delegate_matcher/stubbed_target_spec.rb +43 -0
  97. data/spec/shoulda/matchers/independent/delegate_matcher_spec.rb +250 -0
  98. data/spec/spec_helper.rb +15 -0
  99. data/spec/support/activemodel_helpers.rb +6 -2
  100. data/spec/support/controller_builder.rb +29 -1
  101. data/spec/support/rails_versions.rb +4 -0
  102. data/spec/support/test_application.rb +1 -1
  103. metadata +59 -10
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mcmire-shoulda-matchers
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.0
4
+ version: 2.6.1.docs.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tammer Saleh
@@ -13,20 +13,20 @@ authors:
13
13
  autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
- date: 2014-03-26 00:00:00.000000000 Z
16
+ date: 2014-06-13 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: activesupport
20
20
  requirement: !ruby/object:Gem::Requirement
21
21
  requirements:
22
- - - '>='
22
+ - - ">="
23
23
  - !ruby/object:Gem::Version
24
24
  version: 3.0.0
25
25
  type: :runtime
26
26
  prerelease: false
27
27
  version_requirements: !ruby/object:Gem::Requirement
28
28
  requirements:
29
- - - '>='
29
+ - - ">="
30
30
  - !ruby/object:Gem::Version
31
31
  version: 3.0.0
32
32
  description: Making tests easy on the fingers and eyes
@@ -35,9 +35,9 @@ executables: []
35
35
  extensions: []
36
36
  extra_rdoc_files: []
37
37
  files:
38
- - .gitignore
39
- - .travis.yml
40
- - .yardopts
38
+ - ".gitignore"
39
+ - ".travis.yml"
40
+ - ".yardopts"
41
41
  - Appraisals
42
42
  - CONTRIBUTING.md
43
43
  - Gemfile
@@ -68,22 +68,29 @@ files:
68
68
  - doc_config/yard/templates/default/layout/html/setup.rb
69
69
  - doc_config/yard/templates/default/method_details/html/source.erb
70
70
  - doc_config/yard/templates/default/module/html/box_info.erb
71
+ - features/activemodel_integration.feature
71
72
  - features/rails_integration.feature
73
+ - features/step_definitions/activemodel_steps.rb
72
74
  - features/step_definitions/rails_steps.rb
73
75
  - features/support/env.rb
74
76
  - gemfiles/3.0.gemfile
75
77
  - gemfiles/3.0.gemfile.lock
76
78
  - gemfiles/3.1.gemfile
77
79
  - gemfiles/3.1.gemfile.lock
80
+ - gemfiles/3.1_1.9.2.gemfile
81
+ - gemfiles/3.1_1.9.2.gemfile.lock
78
82
  - gemfiles/3.2.gemfile
79
83
  - gemfiles/3.2.gemfile.lock
80
84
  - gemfiles/4.0.0.gemfile
81
85
  - gemfiles/4.0.0.gemfile.lock
82
86
  - gemfiles/4.0.1.gemfile
83
87
  - gemfiles/4.0.1.gemfile.lock
88
+ - gemfiles/4.1.gemfile
89
+ - gemfiles/4.1.gemfile.lock
84
90
  - lib/shoulda-matchers.rb
85
91
  - lib/shoulda/matchers.rb
86
92
  - lib/shoulda/matchers/action_controller.rb
93
+ - lib/shoulda/matchers/action_controller/callback_matcher.rb
87
94
  - lib/shoulda/matchers/action_controller/filter_param_matcher.rb
88
95
  - lib/shoulda/matchers/action_controller/redirect_to_matcher.rb
89
96
  - lib/shoulda/matchers/action_controller/render_template_matcher.rb
@@ -94,6 +101,7 @@ files:
94
101
  - lib/shoulda/matchers/action_controller/route_params.rb
95
102
  - lib/shoulda/matchers/action_controller/set_session_matcher.rb
96
103
  - lib/shoulda/matchers/action_controller/set_the_flash_matcher.rb
104
+ - lib/shoulda/matchers/action_controller/strong_parameters_matcher.rb
97
105
  - lib/shoulda/matchers/active_model.rb
98
106
  - lib/shoulda/matchers/active_model/allow_mass_assignment_of_matcher.rb
99
107
  - lib/shoulda/matchers/active_model/allow_value_matcher.rb
@@ -125,6 +133,7 @@ files:
125
133
  - lib/shoulda/matchers/active_record/association_matchers.rb
126
134
  - lib/shoulda/matchers/active_record/association_matchers/counter_cache_matcher.rb
127
135
  - lib/shoulda/matchers/active_record/association_matchers/dependent_matcher.rb
136
+ - lib/shoulda/matchers/active_record/association_matchers/inverse_of_matcher.rb
128
137
  - lib/shoulda/matchers/active_record/association_matchers/model_reflection.rb
129
138
  - lib/shoulda/matchers/active_record/association_matchers/model_reflector.rb
130
139
  - lib/shoulda/matchers/active_record/association_matchers/option_verifier.rb
@@ -136,13 +145,28 @@ files:
136
145
  - lib/shoulda/matchers/active_record/have_readonly_attribute_matcher.rb
137
146
  - lib/shoulda/matchers/active_record/serialize_matcher.rb
138
147
  - lib/shoulda/matchers/assertion_error.rb
148
+ - lib/shoulda/matchers/doublespeak.rb
149
+ - lib/shoulda/matchers/doublespeak/double.rb
150
+ - lib/shoulda/matchers/doublespeak/double_collection.rb
151
+ - lib/shoulda/matchers/doublespeak/double_implementation_registry.rb
152
+ - lib/shoulda/matchers/doublespeak/object_double.rb
153
+ - lib/shoulda/matchers/doublespeak/proxy_implementation.rb
154
+ - lib/shoulda/matchers/doublespeak/structs.rb
155
+ - lib/shoulda/matchers/doublespeak/stub_implementation.rb
156
+ - lib/shoulda/matchers/doublespeak/world.rb
139
157
  - lib/shoulda/matchers/error.rb
158
+ - lib/shoulda/matchers/independent.rb
159
+ - lib/shoulda/matchers/independent/delegate_matcher.rb
160
+ - lib/shoulda/matchers/independent/delegate_matcher/stubbed_target.rb
161
+ - lib/shoulda/matchers/integrations.rb
162
+ - lib/shoulda/matchers/integrations/nunit_test_case_detection.rb
140
163
  - lib/shoulda/matchers/integrations/rspec.rb
141
164
  - lib/shoulda/matchers/integrations/test_unit.rb
142
165
  - lib/shoulda/matchers/rails_shim.rb
143
166
  - lib/shoulda/matchers/version.rb
144
167
  - lib/shoulda/matchers/warn.rb
145
168
  - shoulda-matchers.gemspec
169
+ - spec/shoulda/matchers/action_controller/callback_matcher_spec.rb
146
170
  - spec/shoulda/matchers/action_controller/filter_param_matcher_spec.rb
147
171
  - spec/shoulda/matchers/action_controller/redirect_to_matcher_spec.rb
148
172
  - spec/shoulda/matchers/action_controller/render_template_matcher_spec.rb
@@ -153,6 +177,7 @@ files:
153
177
  - spec/shoulda/matchers/action_controller/route_params_spec.rb
154
178
  - spec/shoulda/matchers/action_controller/set_session_matcher_spec.rb
155
179
  - spec/shoulda/matchers/action_controller/set_the_flash_matcher_spec.rb
180
+ - spec/shoulda/matchers/action_controller/strong_parameters_matcher_spec.rb
156
181
  - spec/shoulda/matchers/active_model/allow_mass_assignment_of_matcher_spec.rb
157
182
  - spec/shoulda/matchers/active_model/allow_value_matcher_spec.rb
158
183
  - spec/shoulda/matchers/active_model/disallow_value_matcher_spec.rb
@@ -180,6 +205,16 @@ files:
180
205
  - spec/shoulda/matchers/active_record/have_db_index_matcher_spec.rb
181
206
  - spec/shoulda/matchers/active_record/have_readonly_attributes_matcher_spec.rb
182
207
  - spec/shoulda/matchers/active_record/serialize_matcher_spec.rb
208
+ - spec/shoulda/matchers/doublespeak/double_collection_spec.rb
209
+ - spec/shoulda/matchers/doublespeak/double_implementation_registry_spec.rb
210
+ - spec/shoulda/matchers/doublespeak/double_spec.rb
211
+ - spec/shoulda/matchers/doublespeak/object_double_spec.rb
212
+ - spec/shoulda/matchers/doublespeak/proxy_implementation_spec.rb
213
+ - spec/shoulda/matchers/doublespeak/stub_implementation_spec.rb
214
+ - spec/shoulda/matchers/doublespeak/world_spec.rb
215
+ - spec/shoulda/matchers/doublespeak_spec.rb
216
+ - spec/shoulda/matchers/independent/delegate_matcher/stubbed_target_spec.rb
217
+ - spec/shoulda/matchers/independent/delegate_matcher_spec.rb
183
218
  - spec/spec_helper.rb
184
219
  - spec/support/active_model_versions.rb
185
220
  - spec/support/active_resource_builder.rb
@@ -207,14 +242,14 @@ require_paths:
207
242
  - lib
208
243
  required_ruby_version: !ruby/object:Gem::Requirement
209
244
  requirements:
210
- - - '>='
245
+ - - ">="
211
246
  - !ruby/object:Gem::Version
212
247
  version: 1.9.2
213
248
  required_rubygems_version: !ruby/object:Gem::Requirement
214
249
  requirements:
215
- - - '>='
250
+ - - ">"
216
251
  - !ruby/object:Gem::Version
217
- version: '0'
252
+ version: 1.3.1
218
253
  requirements: []
219
254
  rubyforge_project:
220
255
  rubygems_version: 2.2.2
@@ -222,9 +257,12 @@ signing_key:
222
257
  specification_version: 4
223
258
  summary: Making tests easy on the fingers and eyes
224
259
  test_files:
260
+ - features/activemodel_integration.feature
225
261
  - features/rails_integration.feature
262
+ - features/step_definitions/activemodel_steps.rb
226
263
  - features/step_definitions/rails_steps.rb
227
264
  - features/support/env.rb
265
+ - spec/shoulda/matchers/action_controller/callback_matcher_spec.rb
228
266
  - spec/shoulda/matchers/action_controller/filter_param_matcher_spec.rb
229
267
  - spec/shoulda/matchers/action_controller/redirect_to_matcher_spec.rb
230
268
  - spec/shoulda/matchers/action_controller/render_template_matcher_spec.rb
@@ -235,6 +273,7 @@ test_files:
235
273
  - spec/shoulda/matchers/action_controller/route_params_spec.rb
236
274
  - spec/shoulda/matchers/action_controller/set_session_matcher_spec.rb
237
275
  - spec/shoulda/matchers/action_controller/set_the_flash_matcher_spec.rb
276
+ - spec/shoulda/matchers/action_controller/strong_parameters_matcher_spec.rb
238
277
  - spec/shoulda/matchers/active_model/allow_mass_assignment_of_matcher_spec.rb
239
278
  - spec/shoulda/matchers/active_model/allow_value_matcher_spec.rb
240
279
  - spec/shoulda/matchers/active_model/disallow_value_matcher_spec.rb
@@ -262,6 +301,16 @@ test_files:
262
301
  - spec/shoulda/matchers/active_record/have_db_index_matcher_spec.rb
263
302
  - spec/shoulda/matchers/active_record/have_readonly_attributes_matcher_spec.rb
264
303
  - spec/shoulda/matchers/active_record/serialize_matcher_spec.rb
304
+ - spec/shoulda/matchers/doublespeak/double_collection_spec.rb
305
+ - spec/shoulda/matchers/doublespeak/double_implementation_registry_spec.rb
306
+ - spec/shoulda/matchers/doublespeak/double_spec.rb
307
+ - spec/shoulda/matchers/doublespeak/object_double_spec.rb
308
+ - spec/shoulda/matchers/doublespeak/proxy_implementation_spec.rb
309
+ - spec/shoulda/matchers/doublespeak/stub_implementation_spec.rb
310
+ - spec/shoulda/matchers/doublespeak/world_spec.rb
311
+ - spec/shoulda/matchers/doublespeak_spec.rb
312
+ - spec/shoulda/matchers/independent/delegate_matcher/stubbed_target_spec.rb
313
+ - spec/shoulda/matchers/independent/delegate_matcher_spec.rb
265
314
  - spec/spec_helper.rb
266
315
  - spec/support/active_model_versions.rb
267
316
  - spec/support/active_resource_builder.rb