shoulda-matchers 2.8.0 → 3.0.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.hound_config/ruby.yml +7 -0
- data/.travis.yml +11 -54
- data/Appraisals +45 -100
- data/CONTRIBUTING.md +51 -7
- data/Gemfile +7 -19
- data/Gemfile.lock +60 -134
- data/Guardfile +5 -0
- data/NEWS.md +203 -0
- data/README.md +95 -50
- data/Rakefile +1 -0
- data/doc_config/yard/templates/default/layout/html/setup.rb +1 -1
- data/gemfiles/4.0.0.gemfile +10 -7
- data/gemfiles/4.0.0.gemfile.lock +103 -79
- data/gemfiles/4.0.1.gemfile +10 -7
- data/gemfiles/4.0.1.gemfile.lock +109 -83
- data/gemfiles/4.1.gemfile +10 -7
- data/gemfiles/4.1.gemfile.lock +109 -85
- data/gemfiles/4.2.gemfile +10 -9
- data/gemfiles/4.2.gemfile.lock +86 -78
- data/lib/shoulda/matchers.rb +13 -18
- data/lib/shoulda/matchers/action_controller.rb +4 -1
- data/lib/shoulda/matchers/action_controller/flash_store.rb +95 -0
- data/lib/shoulda/matchers/action_controller/{strong_parameters_matcher.rb → permit_matcher.rb} +147 -30
- data/lib/shoulda/matchers/action_controller/redirect_to_matcher.rb +1 -1
- data/lib/shoulda/matchers/action_controller/render_template_matcher.rb +1 -1
- data/lib/shoulda/matchers/action_controller/render_with_layout_matcher.rb +1 -1
- data/lib/shoulda/matchers/action_controller/rescue_from_matcher.rb +1 -1
- data/lib/shoulda/matchers/action_controller/route_matcher.rb +5 -1
- data/lib/shoulda/matchers/action_controller/route_params.rb +15 -6
- data/lib/shoulda/matchers/action_controller/session_store.rb +34 -0
- data/lib/shoulda/matchers/action_controller/set_flash_matcher.rb +30 -136
- data/lib/shoulda/matchers/action_controller/set_session_matcher.rb +28 -109
- data/lib/shoulda/matchers/action_controller/set_session_or_flash_matcher.rb +103 -0
- data/lib/shoulda/matchers/active_model/allow_mass_assignment_of_matcher.rb +1 -12
- data/lib/shoulda/matchers/active_model/allow_value_matcher.rb +79 -10
- data/lib/shoulda/matchers/active_model/numericality_matchers/numeric_type_matcher.rb +10 -0
- data/lib/shoulda/matchers/active_model/validate_absence_of_matcher.rb +21 -0
- data/lib/shoulda/matchers/active_model/validate_acceptance_of_matcher.rb +24 -0
- data/lib/shoulda/matchers/active_model/validate_confirmation_of_matcher.rb +22 -5
- data/lib/shoulda/matchers/active_model/validate_exclusion_of_matcher.rb +29 -10
- data/lib/shoulda/matchers/active_model/validate_inclusion_of_matcher.rb +27 -10
- data/lib/shoulda/matchers/active_model/validate_length_of_matcher.rb +27 -12
- data/lib/shoulda/matchers/active_model/validate_numericality_of_matcher.rb +56 -20
- data/lib/shoulda/matchers/active_model/validate_presence_of_matcher.rb +3 -11
- data/lib/shoulda/matchers/active_model/validation_message_finder.rb +65 -0
- data/lib/shoulda/matchers/active_record/association_matcher.rb +40 -6
- data/lib/shoulda/matchers/active_record/association_matchers/join_table_matcher.rb +21 -7
- data/lib/shoulda/matchers/active_record/association_matchers/model_reflection.rb +11 -40
- data/lib/shoulda/matchers/active_record/association_matchers/model_reflector.rb +1 -1
- data/lib/shoulda/matchers/active_record/define_enum_for_matcher.rb +2 -6
- data/lib/shoulda/matchers/active_record/validate_uniqueness_of_matcher.rb +137 -22
- data/lib/shoulda/matchers/configuration.rb +20 -0
- data/lib/shoulda/matchers/doublespeak.rb +11 -1
- data/lib/shoulda/matchers/doublespeak/double.rb +29 -11
- data/lib/shoulda/matchers/doublespeak/double_collection.rb +4 -3
- data/lib/shoulda/matchers/doublespeak/method_call.rb +35 -0
- data/lib/shoulda/matchers/doublespeak/object_double.rb +7 -2
- data/lib/shoulda/matchers/doublespeak/proxy_implementation.rb +4 -3
- data/lib/shoulda/matchers/doublespeak/stub_implementation.rb +3 -3
- data/lib/shoulda/matchers/doublespeak/world.rb +21 -1
- data/lib/shoulda/matchers/integrations.rb +43 -0
- data/lib/shoulda/matchers/integrations/configuration.rb +68 -0
- data/lib/shoulda/matchers/integrations/configuration_error.rb +9 -0
- data/lib/shoulda/matchers/integrations/inclusion.rb +20 -0
- data/lib/shoulda/matchers/integrations/libraries.rb +15 -0
- data/lib/shoulda/matchers/integrations/libraries/action_controller.rb +31 -0
- data/lib/shoulda/matchers/integrations/libraries/active_model.rb +26 -0
- data/lib/shoulda/matchers/integrations/libraries/active_record.rb +26 -0
- data/lib/shoulda/matchers/integrations/libraries/missing_library.rb +19 -0
- data/lib/shoulda/matchers/integrations/libraries/rails.rb +30 -0
- data/lib/shoulda/matchers/integrations/rails.rb +12 -0
- data/lib/shoulda/matchers/integrations/registry.rb +28 -0
- data/lib/shoulda/matchers/integrations/test_frameworks.rb +16 -0
- data/lib/shoulda/matchers/integrations/test_frameworks/active_support_test_case.rb +37 -0
- data/lib/shoulda/matchers/integrations/test_frameworks/minitest_4.rb +36 -0
- data/lib/shoulda/matchers/integrations/test_frameworks/minitest_5.rb +37 -0
- data/lib/shoulda/matchers/integrations/test_frameworks/missing_test_framework.rb +40 -0
- data/lib/shoulda/matchers/integrations/test_frameworks/rspec.rb +29 -0
- data/lib/shoulda/matchers/integrations/test_frameworks/test_unit.rb +36 -0
- data/lib/shoulda/matchers/rails_shim.rb +0 -40
- data/lib/shoulda/matchers/version.rb +1 -1
- data/script/SUPPORTED_VERSIONS +1 -1
- data/script/update_gems_in_all_appraisals +14 -0
- data/shoulda-matchers.gemspec +2 -2
- data/spec/acceptance/active_model_integration_spec.rb +4 -1
- data/spec/acceptance/independent_matchers_spec.rb +6 -6
- data/spec/acceptance/multiple_libraries_integration_spec.rb +52 -0
- data/spec/acceptance/rails_integration_spec.rb +15 -5
- data/spec/acceptance_spec_helper.rb +8 -0
- data/spec/doublespeak_spec_helper.rb +14 -0
- data/spec/support/acceptance/adds_shoulda_matchers_to_project.rb +110 -0
- data/spec/support/acceptance/helpers.rb +2 -0
- data/spec/support/acceptance/helpers/base_helpers.rb +6 -1
- data/spec/support/acceptance/helpers/command_helpers.rb +6 -2
- data/spec/support/acceptance/helpers/minitest_helpers.rb +0 -8
- data/spec/support/acceptance/helpers/n_unit_helpers.rb +25 -0
- data/spec/support/acceptance/helpers/rspec_helpers.rb +2 -0
- data/spec/support/acceptance/helpers/step_helpers.rb +13 -19
- data/spec/support/acceptance/matchers/have_output.rb +1 -1
- data/spec/support/tests/bundle.rb +1 -1
- data/spec/support/tests/command_runner.rb +25 -13
- data/spec/support/tests/current_bundle.rb +47 -0
- data/spec/support/tests/database.rb +28 -0
- data/spec/support/tests/database_adapters/postgresql.rb +25 -0
- data/spec/support/tests/database_adapters/sqlite3.rb +26 -0
- data/spec/support/tests/database_configuration.rb +33 -0
- data/spec/support/tests/database_configuration_registry.rb +28 -0
- data/spec/support/tests/filesystem.rb +25 -2
- data/spec/support/unit/helpers/active_record_versions.rb +12 -0
- data/spec/support/unit/helpers/class_builder.rb +6 -2
- data/spec/support/unit/helpers/column_type_helpers.rb +26 -0
- data/spec/support/unit/helpers/controller_builder.rb +0 -28
- data/spec/support/unit/helpers/database_helpers.rb +18 -0
- data/spec/support/unit/helpers/model_builder.rb +38 -6
- data/spec/support/unit/helpers/rails_versions.rb +2 -2
- data/spec/support/unit/matchers/fail_with_message_including_matcher.rb +9 -8
- data/spec/support/unit/matchers/fail_with_message_matcher.rb +1 -1
- data/spec/support/unit/rails_application.rb +29 -13
- data/spec/support/unit/record_validating_confirmation_builder.rb +1 -2
- data/spec/support/unit/shared_examples/set_session_or_flash.rb +355 -0
- data/spec/unit/shoulda/matchers/action_controller/permit_matcher_spec.rb +433 -0
- data/spec/unit/shoulda/matchers/action_controller/render_with_layout_matcher_spec.rb +1 -5
- data/spec/unit/shoulda/matchers/action_controller/route_matcher_spec.rb +37 -0
- data/spec/unit/shoulda/matchers/action_controller/set_flash_matcher_spec.rb +23 -147
- data/spec/unit/shoulda/matchers/action_controller/set_session_matcher_spec.rb +8 -285
- data/spec/unit/shoulda/matchers/action_controller/set_session_or_flash_matcher_spec.rb +562 -0
- data/spec/unit/shoulda/matchers/active_model/allow_value_matcher_spec.rb +81 -14
- data/spec/unit/shoulda/matchers/active_model/disallow_value_matcher_spec.rb +16 -8
- data/spec/unit/shoulda/matchers/active_model/numericality_matchers/comparison_matcher_spec.rb +101 -9
- data/spec/unit/shoulda/matchers/active_model/numericality_matchers/even_number_matcher_spec.rb +39 -1
- data/spec/unit/shoulda/matchers/active_model/numericality_matchers/odd_number_matcher_spec.rb +39 -1
- data/spec/unit/shoulda/matchers/active_model/numericality_matchers/only_integer_matcher_spec.rb +39 -0
- data/spec/unit/shoulda/matchers/active_model/validate_exclusion_of_matcher_spec.rb +0 -17
- data/spec/unit/shoulda/matchers/active_model/validate_inclusion_of_matcher_spec.rb +0 -17
- data/spec/unit/shoulda/matchers/active_model/validate_length_of_matcher_spec.rb +0 -17
- data/spec/unit/shoulda/matchers/active_model/validate_numericality_of_matcher_spec.rb +838 -271
- data/spec/unit/shoulda/matchers/active_model/validate_presence_of_matcher_spec.rb +0 -19
- data/spec/unit/shoulda/matchers/active_record/association_matcher_spec.rb +93 -0
- data/spec/unit/shoulda/matchers/active_record/association_matchers/model_reflection_spec.rb +3 -3
- data/spec/unit/shoulda/matchers/active_record/define_enum_for_matcher_spec.rb +25 -0
- data/spec/unit/shoulda/matchers/active_record/validate_uniqueness_of_matcher_spec.rb +905 -0
- data/spec/unit/shoulda/matchers/doublespeak/double_collection_spec.rb +17 -11
- data/spec/unit/shoulda/matchers/doublespeak/double_implementation_registry_spec.rb +1 -1
- data/spec/unit/shoulda/matchers/doublespeak/double_spec.rb +144 -43
- data/spec/unit/shoulda/matchers/doublespeak/object_double_spec.rb +1 -1
- data/spec/unit/shoulda/matchers/doublespeak/proxy_implementation_spec.rb +36 -11
- data/spec/unit/shoulda/matchers/doublespeak/stub_implementation_spec.rb +29 -16
- data/spec/unit/shoulda/matchers/doublespeak/world_spec.rb +8 -5
- data/spec/unit/shoulda/matchers/doublespeak_spec.rb +1 -1
- data/spec/unit_spec_helper.rb +15 -14
- data/spec/warnings_spy.rb +1 -1
- metadata +68 -29
- data/docs.watchr +0 -5
- data/gemfiles/3.0.gemfile +0 -26
- data/gemfiles/3.0.gemfile.lock +0 -173
- data/gemfiles/3.1.gemfile +0 -32
- data/gemfiles/3.1.gemfile.lock +0 -212
- data/gemfiles/3.1_1.9.2.gemfile +0 -32
- data/gemfiles/3.1_1.9.2.gemfile.lock +0 -212
- data/gemfiles/3.2.gemfile +0 -33
- data/gemfiles/3.2.gemfile.lock +0 -212
- data/gemfiles/3.2_1.9.2.gemfile +0 -31
- data/gemfiles/3.2_1.9.2.gemfile.lock +0 -207
- data/lib/shoulda/matchers/assertion_error.rb +0 -27
- data/lib/shoulda/matchers/doublespeak/structs.rb +0 -10
- data/lib/shoulda/matchers/integrations/nunit_test_case_detection.rb +0 -39
- data/lib/shoulda/matchers/integrations/rspec.rb +0 -19
- data/lib/shoulda/matchers/integrations/test_unit.rb +0 -34
- data/spec/unit/shoulda/matchers/action_controller/strong_parameters_matcher_spec.rb +0 -331
- data/spec/unit/shoulda/matchers/active_model/validate_uniqueness_of_matcher_spec.rb +0 -564
@@ -1,4 +1,4 @@
|
|
1
|
-
require '
|
1
|
+
require 'doublespeak_spec_helper'
|
2
2
|
|
3
3
|
module Shoulda::Matchers::Doublespeak
|
4
4
|
describe StubImplementation do
|
@@ -6,18 +6,20 @@ module Shoulda::Matchers::Doublespeak
|
|
6
6
|
it 'calls #record_call on the double' do
|
7
7
|
implementation = described_class.new
|
8
8
|
double = build_double
|
9
|
+
call = build_call(double: double)
|
9
10
|
|
10
|
-
double.
|
11
|
+
allow(double).to receive(:record_call).with(call)
|
11
12
|
|
12
|
-
implementation.call(
|
13
|
+
implementation.call(call)
|
13
14
|
end
|
14
15
|
|
15
16
|
context 'if no explicit implementation was set' do
|
16
17
|
it 'returns nil' do
|
17
18
|
implementation = described_class.new
|
18
19
|
double = build_double
|
20
|
+
call = build_call(double: double)
|
19
21
|
|
20
|
-
return_value = implementation.call(
|
22
|
+
return_value = implementation.call(call)
|
21
23
|
|
22
24
|
expect(return_value).to eq nil
|
23
25
|
end
|
@@ -28,29 +30,33 @@ module Shoulda::Matchers::Doublespeak
|
|
28
30
|
implementation = described_class.new
|
29
31
|
implementation.returns(42)
|
30
32
|
double = build_double
|
33
|
+
call = build_call(double: double)
|
31
34
|
|
32
|
-
return_value = implementation.call(
|
35
|
+
return_value = implementation.call(call)
|
33
36
|
|
34
37
|
expect(return_value).to eq 42
|
35
38
|
end
|
36
39
|
end
|
37
40
|
|
38
41
|
context 'if the implementation was set as a block' do
|
39
|
-
it 'calls the block with the object
|
42
|
+
it 'calls the block with the MethodCall object the implementation was called with' do
|
40
43
|
double = build_double
|
41
44
|
expected_object, expected_args, expected_block = :object, :args, :block
|
45
|
+
call = build_call(
|
46
|
+
double: double,
|
47
|
+
object: expected_object,
|
48
|
+
args: expected_args,
|
49
|
+
block: expected_block
|
50
|
+
)
|
42
51
|
actual_object, actual_args, actual_block = []
|
43
52
|
implementation = described_class.new
|
44
|
-
implementation.returns do |
|
45
|
-
actual_object
|
53
|
+
implementation.returns do |actual_call|
|
54
|
+
actual_object = actual_call.object
|
55
|
+
actual_args = actual_call.args
|
56
|
+
actual_block = actual_call.block
|
46
57
|
end
|
47
58
|
|
48
|
-
implementation.call(
|
49
|
-
double,
|
50
|
-
expected_object,
|
51
|
-
expected_args,
|
52
|
-
expected_block
|
53
|
-
)
|
59
|
+
implementation.call(call)
|
54
60
|
|
55
61
|
expect(actual_object).to eq expected_object
|
56
62
|
expect(actual_args).to eq expected_args
|
@@ -61,8 +67,9 @@ module Shoulda::Matchers::Doublespeak
|
|
61
67
|
implementation = described_class.new
|
62
68
|
implementation.returns { 42 }
|
63
69
|
double = build_double
|
70
|
+
call = build_call(double: double)
|
64
71
|
|
65
|
-
return_value = implementation.call(
|
72
|
+
return_value = implementation.call(call)
|
66
73
|
|
67
74
|
expect(return_value).to eq 42
|
68
75
|
end
|
@@ -73,8 +80,9 @@ module Shoulda::Matchers::Doublespeak
|
|
73
80
|
implementation = described_class.new
|
74
81
|
implementation.returns(:something_else) { 42 }
|
75
82
|
double = build_double
|
83
|
+
call = build_call(double: double)
|
76
84
|
|
77
|
-
return_value = implementation.call(
|
85
|
+
return_value = implementation.call(call)
|
78
86
|
|
79
87
|
expect(return_value).to eq 42
|
80
88
|
end
|
@@ -84,5 +92,10 @@ module Shoulda::Matchers::Doublespeak
|
|
84
92
|
def build_double
|
85
93
|
double('double', record_call: nil)
|
86
94
|
end
|
95
|
+
|
96
|
+
def build_call(options = {})
|
97
|
+
defaults = { double: build_double }
|
98
|
+
double('call', defaults.merge(options))
|
99
|
+
end
|
87
100
|
end
|
88
101
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
require '
|
1
|
+
require 'doublespeak_spec_helper'
|
2
2
|
|
3
3
|
module Shoulda::Matchers::Doublespeak
|
4
4
|
describe World do
|
@@ -10,16 +10,19 @@ module Shoulda::Matchers::Doublespeak
|
|
10
10
|
world.double_collection_for(:klass)
|
11
11
|
world.double_collection_for(:klass)
|
12
12
|
|
13
|
-
expect(DoubleCollection).
|
13
|
+
expect(DoubleCollection).
|
14
|
+
to have_received(:new).
|
15
|
+
with(world, :klass).
|
16
|
+
once
|
14
17
|
end
|
15
18
|
|
16
19
|
it 'returns the created DoubleCollection' do
|
20
|
+
world = described_class.new
|
17
21
|
double_collection = build_double_collection
|
18
22
|
allow(DoubleCollection).
|
19
23
|
to receive(:new).
|
20
|
-
with(:klass).
|
24
|
+
with(world, :klass).
|
21
25
|
and_return(double_collection)
|
22
|
-
world = described_class.new
|
23
26
|
|
24
27
|
expect(world.double_collection_for(:klass)).to be double_collection
|
25
28
|
end
|
@@ -40,7 +43,7 @@ module Shoulda::Matchers::Doublespeak
|
|
40
43
|
double_collections.zip(klasses).each do |double_collection, klass|
|
41
44
|
allow(DoubleCollection).
|
42
45
|
to receive(:new).
|
43
|
-
with(klass).
|
46
|
+
with(world, klass).
|
44
47
|
and_return(double_collection)
|
45
48
|
world.double_collection_for(klass)
|
46
49
|
end
|
data/spec/unit_spec_helper.rb
CHANGED
@@ -1,24 +1,15 @@
|
|
1
|
-
|
1
|
+
require_relative 'support/tests/current_bundle'
|
2
2
|
|
3
|
-
|
4
|
-
# Rails 3.1's test_help file requires Turn, which loads Minitest in autorun
|
5
|
-
# mode. This means that Minitest tests will run after these RSpec tests are
|
6
|
-
# finished running. This will break on CI since we pass --color to the `rspec`
|
7
|
-
# command.
|
3
|
+
Tests::CurrentBundle.instance.assert_appraisal!
|
8
4
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|
5
|
+
#---
|
6
|
+
|
7
|
+
require File.expand_path('../support/unit/rails_application', __FILE__)
|
15
8
|
|
16
9
|
$test_app = UnitTests::RailsApplication.new
|
17
10
|
$test_app.create
|
18
11
|
$test_app.load
|
19
12
|
|
20
|
-
monkey_patch_minitest_to_do_nothing
|
21
|
-
|
22
13
|
ENV['BUNDLE_GEMFILE'] ||= app.gemfile_path
|
23
14
|
ENV['RAILS_ENV'] = 'test'
|
24
15
|
|
@@ -60,9 +51,19 @@ RSpec.configure do |config|
|
|
60
51
|
UnitTests::RailsVersions.configure_example_group(config)
|
61
52
|
UnitTests::ActiveRecordVersions.configure_example_group(config)
|
62
53
|
UnitTests::ActiveModelVersions.configure_example_group(config)
|
54
|
+
UnitTests::DatabaseHelpers.configure_example_group(config)
|
55
|
+
UnitTests::ColumnTypeHelpers.configure_example_group(config)
|
63
56
|
|
64
57
|
config.include UnitTests::Matchers
|
65
58
|
end
|
66
59
|
|
67
60
|
ActiveSupport::Deprecation.behavior = :stderr
|
61
|
+
|
62
|
+
Shoulda::Matchers.configure do |config|
|
63
|
+
config.integrate do |with|
|
64
|
+
with.test_framework :rspec
|
65
|
+
with.library :rails
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
68
69
|
$VERBOSE = true
|
data/spec/warnings_spy.rb
CHANGED
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:
|
4
|
+
version: 3.0.0.rc1
|
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-01
|
17
|
+
date: 2015-06-01 00:00:00.000000000 Z
|
18
18
|
dependencies:
|
19
19
|
- !ruby/object:Gem::Dependency
|
20
20
|
name: activesupport
|
@@ -22,14 +22,14 @@ dependencies:
|
|
22
22
|
requirements:
|
23
23
|
- - ">="
|
24
24
|
- !ruby/object:Gem::Version
|
25
|
-
version:
|
25
|
+
version: 4.0.0
|
26
26
|
type: :runtime
|
27
27
|
prerelease: false
|
28
28
|
version_requirements: !ruby/object:Gem::Requirement
|
29
29
|
requirements:
|
30
30
|
- - ">="
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version:
|
32
|
+
version: 4.0.0
|
33
33
|
description: Making tests easy on the fingers and eyes
|
34
34
|
email: support@thoughtbot.com
|
35
35
|
executables: []
|
@@ -45,6 +45,7 @@ files:
|
|
45
45
|
- CONTRIBUTING.md
|
46
46
|
- Gemfile
|
47
47
|
- Gemfile.lock
|
48
|
+
- Guardfile
|
48
49
|
- MIT-LICENSE
|
49
50
|
- NEWS.md
|
50
51
|
- README.md
|
@@ -72,17 +73,6 @@ files:
|
|
72
73
|
- doc_config/yard/templates/default/layout/html/setup.rb
|
73
74
|
- doc_config/yard/templates/default/method_details/html/source.erb
|
74
75
|
- doc_config/yard/templates/default/module/html/box_info.erb
|
75
|
-
- docs.watchr
|
76
|
-
- gemfiles/3.0.gemfile
|
77
|
-
- gemfiles/3.0.gemfile.lock
|
78
|
-
- gemfiles/3.1.gemfile
|
79
|
-
- gemfiles/3.1.gemfile.lock
|
80
|
-
- gemfiles/3.1_1.9.2.gemfile
|
81
|
-
- gemfiles/3.1_1.9.2.gemfile.lock
|
82
|
-
- gemfiles/3.2.gemfile
|
83
|
-
- gemfiles/3.2.gemfile.lock
|
84
|
-
- gemfiles/3.2_1.9.2.gemfile
|
85
|
-
- gemfiles/3.2_1.9.2.gemfile.lock
|
86
76
|
- gemfiles/4.0.0.gemfile
|
87
77
|
- gemfiles/4.0.0.gemfile.lock
|
88
78
|
- gemfiles/4.0.1.gemfile
|
@@ -96,6 +86,8 @@ files:
|
|
96
86
|
- lib/shoulda/matchers/action_controller.rb
|
97
87
|
- lib/shoulda/matchers/action_controller/callback_matcher.rb
|
98
88
|
- lib/shoulda/matchers/action_controller/filter_param_matcher.rb
|
89
|
+
- lib/shoulda/matchers/action_controller/flash_store.rb
|
90
|
+
- lib/shoulda/matchers/action_controller/permit_matcher.rb
|
99
91
|
- lib/shoulda/matchers/action_controller/redirect_to_matcher.rb
|
100
92
|
- lib/shoulda/matchers/action_controller/render_template_matcher.rb
|
101
93
|
- lib/shoulda/matchers/action_controller/render_with_layout_matcher.rb
|
@@ -103,9 +95,10 @@ files:
|
|
103
95
|
- lib/shoulda/matchers/action_controller/respond_with_matcher.rb
|
104
96
|
- lib/shoulda/matchers/action_controller/route_matcher.rb
|
105
97
|
- lib/shoulda/matchers/action_controller/route_params.rb
|
98
|
+
- lib/shoulda/matchers/action_controller/session_store.rb
|
106
99
|
- lib/shoulda/matchers/action_controller/set_flash_matcher.rb
|
107
100
|
- lib/shoulda/matchers/action_controller/set_session_matcher.rb
|
108
|
-
- lib/shoulda/matchers/action_controller/
|
101
|
+
- lib/shoulda/matchers/action_controller/set_session_or_flash_matcher.rb
|
109
102
|
- lib/shoulda/matchers/active_model.rb
|
110
103
|
- lib/shoulda/matchers/active_model/allow_mass_assignment_of_matcher.rb
|
111
104
|
- lib/shoulda/matchers/active_model/allow_value_matcher.rb
|
@@ -129,6 +122,7 @@ files:
|
|
129
122
|
- lib/shoulda/matchers/active_model/validate_numericality_of_matcher.rb
|
130
123
|
- lib/shoulda/matchers/active_model/validate_presence_of_matcher.rb
|
131
124
|
- lib/shoulda/matchers/active_model/validation_matcher.rb
|
125
|
+
- lib/shoulda/matchers/active_model/validation_message_finder.rb
|
132
126
|
- lib/shoulda/matchers/active_model/validator.rb
|
133
127
|
- lib/shoulda/matchers/active_model/validator_with_captured_range_error.rb
|
134
128
|
- lib/shoulda/matchers/active_record.rb
|
@@ -156,14 +150,14 @@ files:
|
|
156
150
|
- lib/shoulda/matchers/active_record/uniqueness/test_model_creator.rb
|
157
151
|
- lib/shoulda/matchers/active_record/uniqueness/test_models.rb
|
158
152
|
- lib/shoulda/matchers/active_record/validate_uniqueness_of_matcher.rb
|
159
|
-
- lib/shoulda/matchers/
|
153
|
+
- lib/shoulda/matchers/configuration.rb
|
160
154
|
- lib/shoulda/matchers/doublespeak.rb
|
161
155
|
- lib/shoulda/matchers/doublespeak/double.rb
|
162
156
|
- lib/shoulda/matchers/doublespeak/double_collection.rb
|
163
157
|
- lib/shoulda/matchers/doublespeak/double_implementation_registry.rb
|
158
|
+
- lib/shoulda/matchers/doublespeak/method_call.rb
|
164
159
|
- lib/shoulda/matchers/doublespeak/object_double.rb
|
165
160
|
- lib/shoulda/matchers/doublespeak/proxy_implementation.rb
|
166
|
-
- lib/shoulda/matchers/doublespeak/structs.rb
|
167
161
|
- lib/shoulda/matchers/doublespeak/stub_implementation.rb
|
168
162
|
- lib/shoulda/matchers/doublespeak/world.rb
|
169
163
|
- lib/shoulda/matchers/error.rb
|
@@ -171,9 +165,25 @@ files:
|
|
171
165
|
- lib/shoulda/matchers/independent/delegate_method_matcher.rb
|
172
166
|
- lib/shoulda/matchers/independent/delegate_method_matcher/stubbed_target.rb
|
173
167
|
- lib/shoulda/matchers/independent/delegate_method_matcher/target_not_defined_error.rb
|
174
|
-
- lib/shoulda/matchers/integrations
|
175
|
-
- lib/shoulda/matchers/integrations/
|
176
|
-
- lib/shoulda/matchers/integrations/
|
168
|
+
- lib/shoulda/matchers/integrations.rb
|
169
|
+
- lib/shoulda/matchers/integrations/configuration.rb
|
170
|
+
- lib/shoulda/matchers/integrations/configuration_error.rb
|
171
|
+
- lib/shoulda/matchers/integrations/inclusion.rb
|
172
|
+
- lib/shoulda/matchers/integrations/libraries.rb
|
173
|
+
- lib/shoulda/matchers/integrations/libraries/action_controller.rb
|
174
|
+
- lib/shoulda/matchers/integrations/libraries/active_model.rb
|
175
|
+
- lib/shoulda/matchers/integrations/libraries/active_record.rb
|
176
|
+
- lib/shoulda/matchers/integrations/libraries/missing_library.rb
|
177
|
+
- lib/shoulda/matchers/integrations/libraries/rails.rb
|
178
|
+
- lib/shoulda/matchers/integrations/rails.rb
|
179
|
+
- lib/shoulda/matchers/integrations/registry.rb
|
180
|
+
- lib/shoulda/matchers/integrations/test_frameworks.rb
|
181
|
+
- lib/shoulda/matchers/integrations/test_frameworks/active_support_test_case.rb
|
182
|
+
- lib/shoulda/matchers/integrations/test_frameworks/minitest_4.rb
|
183
|
+
- lib/shoulda/matchers/integrations/test_frameworks/minitest_5.rb
|
184
|
+
- lib/shoulda/matchers/integrations/test_frameworks/missing_test_framework.rb
|
185
|
+
- lib/shoulda/matchers/integrations/test_frameworks/rspec.rb
|
186
|
+
- lib/shoulda/matchers/integrations/test_frameworks/test_unit.rb
|
177
187
|
- lib/shoulda/matchers/matcher_context.rb
|
178
188
|
- lib/shoulda/matchers/rails_shim.rb
|
179
189
|
- lib/shoulda/matchers/util.rb
|
@@ -183,12 +193,16 @@ files:
|
|
183
193
|
- script/install_gems_in_all_appraisals
|
184
194
|
- script/run_all_tests
|
185
195
|
- script/update_gem_in_all_appraisals
|
196
|
+
- script/update_gems_in_all_appraisals
|
186
197
|
- shoulda-matchers.gemspec
|
187
198
|
- spec/acceptance/active_model_integration_spec.rb
|
188
199
|
- spec/acceptance/independent_matchers_spec.rb
|
200
|
+
- spec/acceptance/multiple_libraries_integration_spec.rb
|
189
201
|
- spec/acceptance/rails_integration_spec.rb
|
190
202
|
- spec/acceptance_spec_helper.rb
|
203
|
+
- spec/doublespeak_spec_helper.rb
|
191
204
|
- spec/report_warnings.rb
|
205
|
+
- spec/support/acceptance/adds_shoulda_matchers_to_project.rb
|
192
206
|
- spec/support/acceptance/helpers.rb
|
193
207
|
- spec/support/acceptance/helpers/active_model_helpers.rb
|
194
208
|
- spec/support/acceptance/helpers/array_helpers.rb
|
@@ -197,6 +211,7 @@ files:
|
|
197
211
|
- spec/support/acceptance/helpers/file_helpers.rb
|
198
212
|
- spec/support/acceptance/helpers/gem_helpers.rb
|
199
213
|
- spec/support/acceptance/helpers/minitest_helpers.rb
|
214
|
+
- spec/support/acceptance/helpers/n_unit_helpers.rb
|
200
215
|
- spec/support/acceptance/helpers/pluralization_helpers.rb
|
201
216
|
- spec/support/acceptance/helpers/rails_version_helpers.rb
|
202
217
|
- spec/support/acceptance/helpers/rspec_helpers.rb
|
@@ -207,6 +222,12 @@ files:
|
|
207
222
|
- spec/support/acceptance/matchers/indicate_that_tests_were_run_matcher.rb
|
208
223
|
- spec/support/tests/bundle.rb
|
209
224
|
- spec/support/tests/command_runner.rb
|
225
|
+
- spec/support/tests/current_bundle.rb
|
226
|
+
- spec/support/tests/database.rb
|
227
|
+
- spec/support/tests/database_adapters/postgresql.rb
|
228
|
+
- spec/support/tests/database_adapters/sqlite3.rb
|
229
|
+
- spec/support/tests/database_configuration.rb
|
230
|
+
- spec/support/tests/database_configuration_registry.rb
|
210
231
|
- spec/support/tests/filesystem.rb
|
211
232
|
- spec/support/tests/version.rb
|
212
233
|
- spec/support/unit/capture.rb
|
@@ -216,8 +237,10 @@ files:
|
|
216
237
|
- spec/support/unit/helpers/active_resource_builder.rb
|
217
238
|
- spec/support/unit/helpers/allow_value_matcher_helpers.rb
|
218
239
|
- spec/support/unit/helpers/class_builder.rb
|
240
|
+
- spec/support/unit/helpers/column_type_helpers.rb
|
219
241
|
- spec/support/unit/helpers/confirmation_matcher_helpers.rb
|
220
242
|
- spec/support/unit/helpers/controller_builder.rb
|
243
|
+
- spec/support/unit/helpers/database_helpers.rb
|
221
244
|
- spec/support/unit/helpers/i18n_faker.rb
|
222
245
|
- spec/support/unit/helpers/mailer_builder.rb
|
223
246
|
- spec/support/unit/helpers/model_builder.rb
|
@@ -233,8 +256,10 @@ files:
|
|
233
256
|
- spec/support/unit/record_with_different_error_attribute_builder.rb
|
234
257
|
- spec/support/unit/shared_examples/numerical_submatcher.rb
|
235
258
|
- spec/support/unit/shared_examples/numerical_type_submatcher.rb
|
259
|
+
- spec/support/unit/shared_examples/set_session_or_flash.rb
|
236
260
|
- spec/unit/shoulda/matchers/action_controller/callback_matcher_spec.rb
|
237
261
|
- spec/unit/shoulda/matchers/action_controller/filter_param_matcher_spec.rb
|
262
|
+
- spec/unit/shoulda/matchers/action_controller/permit_matcher_spec.rb
|
238
263
|
- spec/unit/shoulda/matchers/action_controller/redirect_to_matcher_spec.rb
|
239
264
|
- spec/unit/shoulda/matchers/action_controller/render_template_matcher_spec.rb
|
240
265
|
- spec/unit/shoulda/matchers/action_controller/render_with_layout_matcher_spec.rb
|
@@ -244,7 +269,7 @@ files:
|
|
244
269
|
- spec/unit/shoulda/matchers/action_controller/route_params_spec.rb
|
245
270
|
- spec/unit/shoulda/matchers/action_controller/set_flash_matcher_spec.rb
|
246
271
|
- spec/unit/shoulda/matchers/action_controller/set_session_matcher_spec.rb
|
247
|
-
- spec/unit/shoulda/matchers/action_controller/
|
272
|
+
- spec/unit/shoulda/matchers/action_controller/set_session_or_flash_matcher_spec.rb
|
248
273
|
- spec/unit/shoulda/matchers/active_model/allow_mass_assignment_of_matcher_spec.rb
|
249
274
|
- spec/unit/shoulda/matchers/active_model/allow_value_matcher_spec.rb
|
250
275
|
- spec/unit/shoulda/matchers/active_model/disallow_value_matcher_spec.rb
|
@@ -262,7 +287,6 @@ files:
|
|
262
287
|
- spec/unit/shoulda/matchers/active_model/validate_length_of_matcher_spec.rb
|
263
288
|
- spec/unit/shoulda/matchers/active_model/validate_numericality_of_matcher_spec.rb
|
264
289
|
- spec/unit/shoulda/matchers/active_model/validate_presence_of_matcher_spec.rb
|
265
|
-
- spec/unit/shoulda/matchers/active_model/validate_uniqueness_of_matcher_spec.rb
|
266
290
|
- spec/unit/shoulda/matchers/active_record/accept_nested_attributes_for_matcher_spec.rb
|
267
291
|
- spec/unit/shoulda/matchers/active_record/association_matcher_spec.rb
|
268
292
|
- spec/unit/shoulda/matchers/active_record/association_matchers/model_reflection_spec.rb
|
@@ -271,6 +295,7 @@ files:
|
|
271
295
|
- spec/unit/shoulda/matchers/active_record/have_db_index_matcher_spec.rb
|
272
296
|
- spec/unit/shoulda/matchers/active_record/have_readonly_attributes_matcher_spec.rb
|
273
297
|
- spec/unit/shoulda/matchers/active_record/serialize_matcher_spec.rb
|
298
|
+
- spec/unit/shoulda/matchers/active_record/validate_uniqueness_of_matcher_spec.rb
|
274
299
|
- spec/unit/shoulda/matchers/doublespeak/double_collection_spec.rb
|
275
300
|
- spec/unit/shoulda/matchers/doublespeak/double_implementation_registry_spec.rb
|
276
301
|
- spec/unit/shoulda/matchers/doublespeak/double_spec.rb
|
@@ -300,24 +325,27 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
300
325
|
requirements:
|
301
326
|
- - ">="
|
302
327
|
- !ruby/object:Gem::Version
|
303
|
-
version:
|
328
|
+
version: 2.0.0
|
304
329
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
305
330
|
requirements:
|
306
|
-
- - "
|
331
|
+
- - ">"
|
307
332
|
- !ruby/object:Gem::Version
|
308
|
-
version:
|
333
|
+
version: 1.3.1
|
309
334
|
requirements: []
|
310
335
|
rubyforge_project:
|
311
|
-
rubygems_version: 2.
|
336
|
+
rubygems_version: 2.4.5
|
312
337
|
signing_key:
|
313
338
|
specification_version: 4
|
314
339
|
summary: Making tests easy on the fingers and eyes
|
315
340
|
test_files:
|
316
341
|
- spec/acceptance/active_model_integration_spec.rb
|
317
342
|
- spec/acceptance/independent_matchers_spec.rb
|
343
|
+
- spec/acceptance/multiple_libraries_integration_spec.rb
|
318
344
|
- spec/acceptance/rails_integration_spec.rb
|
319
345
|
- spec/acceptance_spec_helper.rb
|
346
|
+
- spec/doublespeak_spec_helper.rb
|
320
347
|
- spec/report_warnings.rb
|
348
|
+
- spec/support/acceptance/adds_shoulda_matchers_to_project.rb
|
321
349
|
- spec/support/acceptance/helpers.rb
|
322
350
|
- spec/support/acceptance/helpers/active_model_helpers.rb
|
323
351
|
- spec/support/acceptance/helpers/array_helpers.rb
|
@@ -326,6 +354,7 @@ test_files:
|
|
326
354
|
- spec/support/acceptance/helpers/file_helpers.rb
|
327
355
|
- spec/support/acceptance/helpers/gem_helpers.rb
|
328
356
|
- spec/support/acceptance/helpers/minitest_helpers.rb
|
357
|
+
- spec/support/acceptance/helpers/n_unit_helpers.rb
|
329
358
|
- spec/support/acceptance/helpers/pluralization_helpers.rb
|
330
359
|
- spec/support/acceptance/helpers/rails_version_helpers.rb
|
331
360
|
- spec/support/acceptance/helpers/rspec_helpers.rb
|
@@ -336,6 +365,12 @@ test_files:
|
|
336
365
|
- spec/support/acceptance/matchers/indicate_that_tests_were_run_matcher.rb
|
337
366
|
- spec/support/tests/bundle.rb
|
338
367
|
- spec/support/tests/command_runner.rb
|
368
|
+
- spec/support/tests/current_bundle.rb
|
369
|
+
- spec/support/tests/database.rb
|
370
|
+
- spec/support/tests/database_adapters/postgresql.rb
|
371
|
+
- spec/support/tests/database_adapters/sqlite3.rb
|
372
|
+
- spec/support/tests/database_configuration.rb
|
373
|
+
- spec/support/tests/database_configuration_registry.rb
|
339
374
|
- spec/support/tests/filesystem.rb
|
340
375
|
- spec/support/tests/version.rb
|
341
376
|
- spec/support/unit/capture.rb
|
@@ -345,8 +380,10 @@ test_files:
|
|
345
380
|
- spec/support/unit/helpers/active_resource_builder.rb
|
346
381
|
- spec/support/unit/helpers/allow_value_matcher_helpers.rb
|
347
382
|
- spec/support/unit/helpers/class_builder.rb
|
383
|
+
- spec/support/unit/helpers/column_type_helpers.rb
|
348
384
|
- spec/support/unit/helpers/confirmation_matcher_helpers.rb
|
349
385
|
- spec/support/unit/helpers/controller_builder.rb
|
386
|
+
- spec/support/unit/helpers/database_helpers.rb
|
350
387
|
- spec/support/unit/helpers/i18n_faker.rb
|
351
388
|
- spec/support/unit/helpers/mailer_builder.rb
|
352
389
|
- spec/support/unit/helpers/model_builder.rb
|
@@ -362,8 +399,10 @@ test_files:
|
|
362
399
|
- spec/support/unit/record_with_different_error_attribute_builder.rb
|
363
400
|
- spec/support/unit/shared_examples/numerical_submatcher.rb
|
364
401
|
- spec/support/unit/shared_examples/numerical_type_submatcher.rb
|
402
|
+
- spec/support/unit/shared_examples/set_session_or_flash.rb
|
365
403
|
- spec/unit/shoulda/matchers/action_controller/callback_matcher_spec.rb
|
366
404
|
- spec/unit/shoulda/matchers/action_controller/filter_param_matcher_spec.rb
|
405
|
+
- spec/unit/shoulda/matchers/action_controller/permit_matcher_spec.rb
|
367
406
|
- spec/unit/shoulda/matchers/action_controller/redirect_to_matcher_spec.rb
|
368
407
|
- spec/unit/shoulda/matchers/action_controller/render_template_matcher_spec.rb
|
369
408
|
- spec/unit/shoulda/matchers/action_controller/render_with_layout_matcher_spec.rb
|
@@ -373,7 +412,7 @@ test_files:
|
|
373
412
|
- spec/unit/shoulda/matchers/action_controller/route_params_spec.rb
|
374
413
|
- spec/unit/shoulda/matchers/action_controller/set_flash_matcher_spec.rb
|
375
414
|
- spec/unit/shoulda/matchers/action_controller/set_session_matcher_spec.rb
|
376
|
-
- spec/unit/shoulda/matchers/action_controller/
|
415
|
+
- spec/unit/shoulda/matchers/action_controller/set_session_or_flash_matcher_spec.rb
|
377
416
|
- spec/unit/shoulda/matchers/active_model/allow_mass_assignment_of_matcher_spec.rb
|
378
417
|
- spec/unit/shoulda/matchers/active_model/allow_value_matcher_spec.rb
|
379
418
|
- spec/unit/shoulda/matchers/active_model/disallow_value_matcher_spec.rb
|
@@ -391,7 +430,6 @@ test_files:
|
|
391
430
|
- spec/unit/shoulda/matchers/active_model/validate_length_of_matcher_spec.rb
|
392
431
|
- spec/unit/shoulda/matchers/active_model/validate_numericality_of_matcher_spec.rb
|
393
432
|
- spec/unit/shoulda/matchers/active_model/validate_presence_of_matcher_spec.rb
|
394
|
-
- spec/unit/shoulda/matchers/active_model/validate_uniqueness_of_matcher_spec.rb
|
395
433
|
- spec/unit/shoulda/matchers/active_record/accept_nested_attributes_for_matcher_spec.rb
|
396
434
|
- spec/unit/shoulda/matchers/active_record/association_matcher_spec.rb
|
397
435
|
- spec/unit/shoulda/matchers/active_record/association_matchers/model_reflection_spec.rb
|
@@ -400,6 +438,7 @@ test_files:
|
|
400
438
|
- spec/unit/shoulda/matchers/active_record/have_db_index_matcher_spec.rb
|
401
439
|
- spec/unit/shoulda/matchers/active_record/have_readonly_attributes_matcher_spec.rb
|
402
440
|
- spec/unit/shoulda/matchers/active_record/serialize_matcher_spec.rb
|
441
|
+
- spec/unit/shoulda/matchers/active_record/validate_uniqueness_of_matcher_spec.rb
|
403
442
|
- spec/unit/shoulda/matchers/doublespeak/double_collection_spec.rb
|
404
443
|
- spec/unit/shoulda/matchers/doublespeak/double_implementation_registry_spec.rb
|
405
444
|
- spec/unit/shoulda/matchers/doublespeak/double_spec.rb
|