shoulda-matchers 3.0.0.rc1 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (106) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +2 -3
  3. data/Gemfile.lock +12 -41
  4. data/NEWS.md +118 -26
  5. data/README.md +34 -11
  6. data/doc_config/yard/templates/default/fulldoc/html/css/bootstrap.css +0 -0
  7. data/doc_config/yard/templates/default/fulldoc/html/css/style.css +4 -0
  8. data/gemfiles/4.0.0.gemfile +2 -3
  9. data/gemfiles/4.0.0.gemfile.lock +47 -77
  10. data/gemfiles/4.0.1.gemfile +2 -3
  11. data/gemfiles/4.0.1.gemfile.lock +51 -79
  12. data/gemfiles/4.1.gemfile +2 -3
  13. data/gemfiles/4.1.gemfile.lock +73 -103
  14. data/gemfiles/4.2.gemfile +2 -3
  15. data/gemfiles/4.2.gemfile.lock +90 -124
  16. data/lib/shoulda/matchers.rb +1 -0
  17. data/lib/shoulda/matchers/action_controller/callback_matcher.rb +6 -8
  18. data/lib/shoulda/matchers/action_controller/filter_param_matcher.rb +1 -3
  19. data/lib/shoulda/matchers/action_controller/flash_store.rb +1 -8
  20. data/lib/shoulda/matchers/action_controller/permit_matcher.rb +140 -88
  21. data/lib/shoulda/matchers/action_controller/redirect_to_matcher.rb +2 -5
  22. data/lib/shoulda/matchers/action_controller/render_template_matcher.rb +5 -10
  23. data/lib/shoulda/matchers/action_controller/render_with_layout_matcher.rb +2 -4
  24. data/lib/shoulda/matchers/action_controller/rescue_from_matcher.rb +1 -3
  25. data/lib/shoulda/matchers/action_controller/respond_with_matcher.rb +3 -5
  26. data/lib/shoulda/matchers/action_controller/route_matcher.rb +5 -7
  27. data/lib/shoulda/matchers/action_controller/set_flash_matcher.rb +35 -9
  28. data/lib/shoulda/matchers/action_controller/set_session_matcher.rb +3 -3
  29. data/lib/shoulda/matchers/active_model.rb +57 -1
  30. data/lib/shoulda/matchers/active_model/allow_mass_assignment_of_matcher.rb +2 -5
  31. data/lib/shoulda/matchers/active_model/allow_value_matcher.rb +162 -54
  32. data/lib/shoulda/matchers/active_model/disallow_value_matcher.rb +5 -2
  33. data/lib/shoulda/matchers/active_model/have_secure_password_matcher.rb +1 -3
  34. data/lib/shoulda/matchers/active_model/numericality_matchers/comparison_matcher.rb +24 -11
  35. data/lib/shoulda/matchers/active_model/numericality_matchers/even_number_matcher.rb +4 -3
  36. data/lib/shoulda/matchers/active_model/numericality_matchers/numeric_type_matcher.rb +0 -2
  37. data/lib/shoulda/matchers/active_model/numericality_matchers/odd_number_matcher.rb +4 -3
  38. data/lib/shoulda/matchers/active_model/numericality_matchers/only_integer_matcher.rb +2 -1
  39. data/lib/shoulda/matchers/active_model/validate_absence_of_matcher.rb +15 -13
  40. data/lib/shoulda/matchers/active_model/validate_acceptance_of_matcher.rb +3 -3
  41. data/lib/shoulda/matchers/active_model/validate_confirmation_of_matcher.rb +3 -3
  42. data/lib/shoulda/matchers/active_model/validate_exclusion_of_matcher.rb +4 -4
  43. data/lib/shoulda/matchers/active_model/validate_inclusion_of_matcher.rb +8 -8
  44. data/lib/shoulda/matchers/active_model/validate_length_of_matcher.rb +8 -8
  45. data/lib/shoulda/matchers/active_model/validate_numericality_of_matcher.rb +12 -14
  46. data/lib/shoulda/matchers/active_model/validate_presence_of_matcher.rb +10 -4
  47. data/lib/shoulda/matchers/active_model/validation_matcher.rb +0 -3
  48. data/lib/shoulda/matchers/active_model/validator.rb +0 -8
  49. data/lib/shoulda/matchers/active_record/accept_nested_attributes_for_matcher.rb +4 -6
  50. data/lib/shoulda/matchers/active_record/association_matcher.rb +58 -43
  51. data/lib/shoulda/matchers/active_record/define_enum_for_matcher.rb +2 -2
  52. data/lib/shoulda/matchers/active_record/have_db_column_matcher.rb +3 -5
  53. data/lib/shoulda/matchers/active_record/have_db_index_matcher.rb +3 -5
  54. data/lib/shoulda/matchers/active_record/have_readonly_attribute_matcher.rb +1 -4
  55. data/lib/shoulda/matchers/active_record/serialize_matcher.rb +3 -5
  56. data/lib/shoulda/matchers/active_record/validate_uniqueness_of_matcher.rb +7 -7
  57. data/lib/shoulda/matchers/doublespeak/double.rb +10 -1
  58. data/lib/shoulda/matchers/doublespeak/double_collection.rb +13 -5
  59. data/lib/shoulda/matchers/doublespeak/method_call.rb +10 -1
  60. data/lib/shoulda/matchers/doublespeak/object_double.rb +2 -1
  61. data/lib/shoulda/matchers/doublespeak/world.rb +10 -0
  62. data/lib/shoulda/matchers/error.rb +4 -0
  63. data/lib/shoulda/matchers/independent/delegate_method_matcher.rb +11 -10
  64. data/lib/shoulda/matchers/integrations/libraries.rb +1 -0
  65. data/lib/shoulda/matchers/integrations/libraries/action_controller.rb +1 -1
  66. data/lib/shoulda/matchers/integrations/libraries/active_model.rb +1 -1
  67. data/lib/shoulda/matchers/integrations/libraries/active_record.rb +1 -1
  68. data/lib/shoulda/matchers/integrations/libraries/rails.rb +2 -1
  69. data/lib/shoulda/matchers/integrations/libraries/routing.rb +27 -0
  70. data/lib/shoulda/matchers/integrations/test_frameworks/active_support_test_case.rb +1 -1
  71. data/lib/shoulda/matchers/integrations/test_frameworks/minitest_4.rb +1 -1
  72. data/lib/shoulda/matchers/integrations/test_frameworks/minitest_5.rb +1 -1
  73. data/lib/shoulda/matchers/integrations/test_frameworks/missing_test_framework.rb +1 -1
  74. data/lib/shoulda/matchers/integrations/test_frameworks/rspec.rb +2 -2
  75. data/lib/shoulda/matchers/integrations/test_frameworks/test_unit.rb +1 -1
  76. data/lib/shoulda/matchers/routing.rb +10 -0
  77. data/lib/shoulda/matchers/version.rb +1 -1
  78. data/script/SUPPORTED_VERSIONS +1 -1
  79. data/spec/acceptance/independent_matchers_spec.rb +103 -42
  80. data/spec/doublespeak_spec_helper.rb +5 -1
  81. data/spec/support/acceptance/adds_shoulda_matchers_to_project.rb +34 -11
  82. data/spec/support/acceptance/helpers/rspec_helpers.rb +9 -13
  83. data/spec/support/acceptance/helpers/step_helpers.rb +13 -0
  84. data/spec/support/acceptance/matchers/have_output.rb +1 -1
  85. data/spec/support/acceptance/matchers/indicate_number_of_tests_was_run_matcher.rb +1 -1
  86. data/spec/support/tests/command_runner.rb +5 -1
  87. data/spec/support/unit/helpers/active_record_versions.rb +0 -4
  88. data/spec/support/unit/shared_examples/set_session_or_flash.rb +8 -3
  89. data/spec/unit/shoulda/matchers/action_controller/permit_matcher_spec.rb +198 -39
  90. data/spec/unit/shoulda/matchers/action_controller/route_matcher_spec.rb +269 -102
  91. data/spec/unit/shoulda/matchers/action_controller/set_flash_matcher_spec.rb +24 -0
  92. data/spec/unit/shoulda/matchers/active_model/allow_value_matcher_spec.rb +118 -101
  93. data/spec/unit/shoulda/matchers/active_model/disallow_value_matcher_spec.rb +0 -82
  94. data/spec/unit/shoulda/matchers/active_model/numericality_matchers/comparison_matcher_spec.rb +148 -121
  95. data/spec/unit/shoulda/matchers/active_model/validate_acceptance_of_matcher_spec.rb +20 -8
  96. data/spec/unit/shoulda/matchers/active_model/validate_numericality_of_matcher_spec.rb +64 -183
  97. data/spec/unit/shoulda/matchers/active_model/validate_presence_of_matcher_spec.rb +14 -0
  98. data/spec/unit/shoulda/matchers/doublespeak/double_collection_spec.rb +60 -0
  99. data/spec/unit/shoulda/matchers/doublespeak/double_spec.rb +23 -7
  100. data/spec/unit/shoulda/matchers/routing/route_matcher_spec.rb +242 -0
  101. data/spec/unit_spec_helper.rb +4 -0
  102. data/tasks/documentation.rb +35 -0
  103. metadata +9 -8
  104. data/Guardfile +0 -5
  105. data/cucumber.yml +0 -1
  106. data/lib/shoulda/matchers/active_model/validator_with_captured_range_error.rb +0 -12
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shoulda-matchers
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0.rc1
4
+ version: 3.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tammer Saleh
@@ -14,7 +14,7 @@ authors:
14
14
  autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
- date: 2015-06-01 00:00:00.000000000 Z
17
+ date: 2015-10-01 00:00:00.000000000 Z
18
18
  dependencies:
19
19
  - !ruby/object:Gem::Dependency
20
20
  name: activesupport
@@ -45,12 +45,10 @@ files:
45
45
  - CONTRIBUTING.md
46
46
  - Gemfile
47
47
  - Gemfile.lock
48
- - Guardfile
49
48
  - MIT-LICENSE
50
49
  - NEWS.md
51
50
  - README.md
52
51
  - Rakefile
53
- - cucumber.yml
54
52
  - doc_config/gh-pages/index.html.erb
55
53
  - doc_config/yard/setup.rb
56
54
  - doc_config/yard/templates/default/fulldoc/html/css/bootstrap.css
@@ -124,7 +122,6 @@ files:
124
122
  - lib/shoulda/matchers/active_model/validation_matcher.rb
125
123
  - lib/shoulda/matchers/active_model/validation_message_finder.rb
126
124
  - lib/shoulda/matchers/active_model/validator.rb
127
- - lib/shoulda/matchers/active_model/validator_with_captured_range_error.rb
128
125
  - lib/shoulda/matchers/active_record.rb
129
126
  - lib/shoulda/matchers/active_record/accept_nested_attributes_for_matcher.rb
130
127
  - lib/shoulda/matchers/active_record/association_matcher.rb
@@ -175,6 +172,7 @@ files:
175
172
  - lib/shoulda/matchers/integrations/libraries/active_record.rb
176
173
  - lib/shoulda/matchers/integrations/libraries/missing_library.rb
177
174
  - lib/shoulda/matchers/integrations/libraries/rails.rb
175
+ - lib/shoulda/matchers/integrations/libraries/routing.rb
178
176
  - lib/shoulda/matchers/integrations/rails.rb
179
177
  - lib/shoulda/matchers/integrations/registry.rb
180
178
  - lib/shoulda/matchers/integrations/test_frameworks.rb
@@ -186,6 +184,7 @@ files:
186
184
  - lib/shoulda/matchers/integrations/test_frameworks/test_unit.rb
187
185
  - lib/shoulda/matchers/matcher_context.rb
188
186
  - lib/shoulda/matchers/rails_shim.rb
187
+ - lib/shoulda/matchers/routing.rb
189
188
  - lib/shoulda/matchers/util.rb
190
189
  - lib/shoulda/matchers/version.rb
191
190
  - lib/shoulda/matchers/warn.rb
@@ -306,6 +305,7 @@ files:
306
305
  - spec/unit/shoulda/matchers/doublespeak_spec.rb
307
306
  - spec/unit/shoulda/matchers/independent/delegate_method_matcher/stubbed_target_spec.rb
308
307
  - spec/unit/shoulda/matchers/independent/delegate_method_matcher_spec.rb
308
+ - spec/unit/shoulda/matchers/routing/route_matcher_spec.rb
309
309
  - spec/unit_spec_helper.rb
310
310
  - spec/warnings_spy.rb
311
311
  - spec/warnings_spy/filesystem.rb
@@ -328,12 +328,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
328
328
  version: 2.0.0
329
329
  required_rubygems_version: !ruby/object:Gem::Requirement
330
330
  requirements:
331
- - - ">"
331
+ - - ">="
332
332
  - !ruby/object:Gem::Version
333
- version: 1.3.1
333
+ version: '0'
334
334
  requirements: []
335
335
  rubyforge_project:
336
- rubygems_version: 2.4.5
336
+ rubygems_version: 2.4.5.1
337
337
  signing_key:
338
338
  specification_version: 4
339
339
  summary: Making tests easy on the fingers and eyes
@@ -449,6 +449,7 @@ test_files:
449
449
  - spec/unit/shoulda/matchers/doublespeak_spec.rb
450
450
  - spec/unit/shoulda/matchers/independent/delegate_method_matcher/stubbed_target_spec.rb
451
451
  - spec/unit/shoulda/matchers/independent/delegate_method_matcher_spec.rb
452
+ - spec/unit/shoulda/matchers/routing/route_matcher_spec.rb
452
453
  - spec/unit_spec_helper.rb
453
454
  - spec/warnings_spy.rb
454
455
  - spec/warnings_spy/filesystem.rb
data/Guardfile DELETED
@@ -1,5 +0,0 @@
1
- guard 'yard' do
2
- watch('README.md')
3
- watch(%r{doc_config/yard/.+})
4
- watch(%r{lib/[^/]+\.rb})
5
- end
data/cucumber.yml DELETED
@@ -1 +0,0 @@
1
- without_spring: --tags ~@spring
@@ -1,12 +0,0 @@
1
- module Shoulda
2
- module Matchers
3
- module ActiveModel
4
- # @private
5
- module ValidatorWithCapturedRangeError
6
- def messages_description
7
- ' RangeError: ' + captured_range_error.message.inspect
8
- end
9
- end
10
- end
11
- end
12
- end