shoulda-matchers 1.4.2 → 1.5.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +11 -3
- data/Appraisals +3 -3
- data/Gemfile +1 -1
- data/Gemfile.lock +69 -70
- data/MIT-LICENSE +1 -1
- data/NEWS.md +22 -4
- data/README.md +3 -1
- data/Rakefile +9 -5
- data/features/step_definitions/rails_steps.rb +7 -7
- data/features/support/env.rb +1 -1
- data/gemfiles/3.0.gemfile +1 -1
- data/gemfiles/3.0.gemfile.lock +25 -22
- data/gemfiles/3.1.gemfile +1 -1
- data/gemfiles/3.1.gemfile.lock +27 -24
- data/gemfiles/3.2.gemfile +1 -1
- data/gemfiles/3.2.gemfile.lock +56 -52
- data/lib/shoulda/matchers/action_controller.rb +3 -2
- data/lib/shoulda/matchers/action_controller/assign_to_matcher.rb +10 -8
- data/lib/shoulda/matchers/action_controller/filter_param_matcher.rb +2 -4
- data/lib/shoulda/matchers/action_controller/redirect_to_matcher.rb +3 -4
- data/lib/shoulda/matchers/action_controller/render_template_matcher.rb +3 -4
- data/lib/shoulda/matchers/action_controller/render_with_layout_matcher.rb +6 -6
- data/lib/shoulda/matchers/action_controller/respond_with_content_type_matcher.rb +5 -2
- data/lib/shoulda/matchers/action_controller/respond_with_matcher.rb +2 -2
- data/lib/shoulda/matchers/action_controller/route_matcher.rb +12 -12
- data/lib/shoulda/matchers/action_controller/set_session_matcher.rb +3 -4
- data/lib/shoulda/matchers/action_controller/set_the_flash_matcher.rb +10 -11
- data/lib/shoulda/matchers/action_controller/strong_parameters_matcher.rb +121 -0
- data/lib/shoulda/matchers/action_mailer/have_sent_email_matcher.rb +7 -4
- data/lib/shoulda/matchers/active_model.rb +1 -1
- data/lib/shoulda/matchers/active_model/allow_mass_assignment_of_matcher.rb +8 -8
- data/lib/shoulda/matchers/active_model/allow_value_matcher.rb +5 -4
- data/lib/shoulda/matchers/active_model/disallow_value_matcher.rb +3 -3
- data/lib/shoulda/matchers/active_model/ensure_inclusion_of_matcher.rb +2 -2
- data/lib/shoulda/matchers/active_model/exception_message_finder.rb +0 -1
- data/lib/shoulda/matchers/active_model/helpers.rb +16 -7
- data/lib/shoulda/matchers/active_model/only_integer_matcher.rb +3 -3
- data/lib/shoulda/matchers/active_model/validate_confirmation_of_matcher.rb +8 -6
- data/lib/shoulda/matchers/active_model/validate_format_of_matcher.rb +19 -10
- data/lib/shoulda/matchers/active_model/validate_numericality_of_matcher.rb +4 -4
- data/lib/shoulda/matchers/active_model/validate_uniqueness_of_matcher.rb +19 -21
- data/lib/shoulda/matchers/active_model/validation_matcher.rb +7 -7
- data/lib/shoulda/matchers/active_model/validation_message_finder.rb +1 -1
- data/lib/shoulda/matchers/active_record/accept_nested_attributes_for_matcher.rb +5 -5
- data/lib/shoulda/matchers/active_record/association_matcher.rb +3 -3
- data/lib/shoulda/matchers/active_record/have_db_column_matcher.rb +11 -7
- data/lib/shoulda/matchers/active_record/have_db_index_matcher.rb +2 -2
- data/lib/shoulda/matchers/active_record/have_readonly_attribute_matcher.rb +5 -5
- data/lib/shoulda/matchers/active_record/query_the_database_matcher.rb +5 -2
- data/lib/shoulda/matchers/active_record/serialize_matcher.rb +3 -3
- data/lib/shoulda/matchers/assertion_error.rb +4 -1
- data/lib/shoulda/matchers/independent/delegate_matcher.rb +17 -7
- data/lib/shoulda/matchers/integrations/rspec.rb +19 -33
- data/lib/shoulda/matchers/version.rb +1 -1
- data/shoulda-matchers.gemspec +6 -4
- data/spec/shoulda/matchers/action_controller/assign_to_matcher_spec.rb +66 -0
- data/spec/shoulda/matchers/action_controller/filter_param_matcher_spec.rb +22 -0
- data/spec/shoulda/matchers/action_controller/redirect_to_matcher_spec.rb +42 -0
- data/spec/shoulda/matchers/action_controller/render_template_matcher_spec.rb +78 -0
- data/spec/shoulda/matchers/action_controller/render_with_layout_matcher_spec.rb +58 -0
- data/spec/shoulda/matchers/action_controller/respond_with_content_type_matcher_spec.rb +31 -0
- data/spec/shoulda/matchers/action_controller/respond_with_matcher_spec.rb +31 -0
- data/spec/shoulda/matchers/action_controller/route_matcher_spec.rb +65 -0
- data/spec/shoulda/matchers/action_controller/set_session_matcher_spec.rb +51 -0
- data/spec/shoulda/matchers/action_controller/set_the_flash_matcher_spec.rb +153 -0
- data/spec/shoulda/matchers/action_controller/strong_parameters_matcher_spec.rb +142 -0
- data/spec/shoulda/matchers/action_mailer/have_sent_email_spec.rb +324 -0
- data/spec/shoulda/matchers/active_model/allow_mass_assignment_of_matcher_spec.rb +111 -0
- data/spec/shoulda/matchers/active_model/allow_value_matcher_spec.rb +124 -0
- data/spec/shoulda/matchers/active_model/disallow_value_matcher_spec.rb +43 -0
- data/spec/shoulda/matchers/active_model/ensure_exclusion_of_matcher_spec.rb +74 -0
- data/spec/shoulda/matchers/active_model/ensure_inclusion_of_matcher_spec.rb +171 -0
- data/spec/shoulda/matchers/active_model/ensure_length_of_matcher_spec.rb +113 -0
- data/spec/shoulda/{active_model → matchers/active_model}/exception_message_finder_spec.rb +2 -2
- data/spec/shoulda/matchers/active_model/helpers_spec.rb +158 -0
- data/spec/shoulda/matchers/active_model/only_integer_matcher_spec.rb +52 -0
- data/spec/shoulda/matchers/active_model/validate_acceptance_of_matcher_spec.rb +41 -0
- data/spec/shoulda/matchers/active_model/validate_confirmation_of_matcher_spec.rb +41 -0
- data/spec/shoulda/matchers/active_model/validate_format_of_matcher_spec.rb +75 -0
- data/spec/shoulda/matchers/active_model/validate_numericality_of_matcher_spec.rb +73 -0
- data/spec/shoulda/matchers/active_model/validate_presence_of_matcher_spec.rb +127 -0
- data/spec/shoulda/matchers/active_model/validate_uniqueness_of_matcher_spec.rb +175 -0
- data/spec/shoulda/{active_model → matchers/active_model}/validation_message_finder_spec.rb +0 -1
- data/spec/shoulda/matchers/active_record/accept_nested_attributes_for_matcher_spec.rb +106 -0
- data/spec/shoulda/matchers/active_record/association_matcher_spec.rb +534 -0
- data/spec/shoulda/matchers/active_record/have_db_column_matcher_spec.rb +111 -0
- data/spec/shoulda/matchers/active_record/have_db_index_matcher_spec.rb +78 -0
- data/spec/shoulda/matchers/active_record/have_readonly_attributes_matcher_spec.rb +41 -0
- data/spec/shoulda/{active_record → matchers/active_record}/query_the_database_matcher_spec.rb +10 -10
- data/spec/shoulda/matchers/active_record/serialize_matcher_spec.rb +86 -0
- data/spec/shoulda/{independent → matchers/independent}/delegate_matcher_spec.rb +55 -34
- data/spec/spec_helper.rb +1 -2
- data/spec/support/active_model_versions.rb +4 -0
- data/spec/support/activemodel_helpers.rb +19 -0
- data/spec/support/controller_builder.rb +38 -12
- data/spec/support/model_builder.rb +8 -2
- metadata +106 -98
- data/spec/fixtures/addresses.yml +0 -3
- data/spec/fixtures/friendships.yml +0 -0
- data/spec/fixtures/posts.yml +0 -5
- data/spec/fixtures/products.yml +0 -0
- data/spec/fixtures/taggings.yml +0 -0
- data/spec/fixtures/tags.yml +0 -9
- data/spec/fixtures/users.yml +0 -6
- data/spec/shoulda/action_controller/assign_to_matcher_spec.rb +0 -63
- data/spec/shoulda/action_controller/filter_param_matcher_spec.rb +0 -20
- data/spec/shoulda/action_controller/redirect_to_matcher_spec.rb +0 -40
- data/spec/shoulda/action_controller/render_template_matcher_spec.rb +0 -69
- data/spec/shoulda/action_controller/render_with_layout_matcher_spec.rb +0 -55
- data/spec/shoulda/action_controller/respond_with_content_type_matcher_spec.rb +0 -28
- data/spec/shoulda/action_controller/respond_with_matcher_spec.rb +0 -83
- data/spec/shoulda/action_controller/route_matcher_spec.rb +0 -65
- data/spec/shoulda/action_controller/set_session_matcher_spec.rb +0 -46
- data/spec/shoulda/action_controller/set_the_flash_matcher_spec.rb +0 -130
- data/spec/shoulda/action_mailer/have_sent_email_spec.rb +0 -333
- data/spec/shoulda/active_model/allow_mass_assignment_of_matcher_spec.rb +0 -115
- data/spec/shoulda/active_model/allow_value_matcher_spec.rb +0 -131
- data/spec/shoulda/active_model/disallow_value_matcher_spec.rb +0 -65
- data/spec/shoulda/active_model/ensure_exclusion_of_matcher_spec.rb +0 -79
- data/spec/shoulda/active_model/ensure_inclusion_of_matcher_spec.rb +0 -181
- data/spec/shoulda/active_model/ensure_length_of_matcher_spec.rb +0 -138
- data/spec/shoulda/active_model/helpers_spec.rb +0 -129
- data/spec/shoulda/active_model/only_integer_matcher_spec.rb +0 -69
- data/spec/shoulda/active_model/validate_acceptance_of_matcher_spec.rb +0 -43
- data/spec/shoulda/active_model/validate_confirmation_of_matcher_spec.rb +0 -48
- data/spec/shoulda/active_model/validate_format_of_matcher_spec.rb +0 -79
- data/spec/shoulda/active_model/validate_numericality_of_matcher_spec.rb +0 -112
- data/spec/shoulda/active_model/validate_presence_of_matcher_spec.rb +0 -135
- data/spec/shoulda/active_model/validate_uniqueness_of_matcher_spec.rb +0 -154
- data/spec/shoulda/active_record/accept_nested_attributes_for_matcher_spec.rb +0 -84
- data/spec/shoulda/active_record/association_matcher_spec.rb +0 -642
- data/spec/shoulda/active_record/have_db_column_matcher_spec.rb +0 -185
- data/spec/shoulda/active_record/have_db_index_matcher_spec.rb +0 -105
- data/spec/shoulda/active_record/have_readonly_attributes_matcher_spec.rb +0 -46
- data/spec/shoulda/active_record/serialize_matcher_spec.rb +0 -81
data/gemfiles/3.1.gemfile
CHANGED
@@ -9,7 +9,7 @@ gem "activerecord-jdbcsqlite3-adapter", :platform=>:jruby
|
|
9
9
|
gem "jdbc-sqlite3", :platform=>:jruby
|
10
10
|
gem "jruby-openssl", :platform=>:jruby
|
11
11
|
gem "therubyrhino", :platform=>:jruby
|
12
|
-
gem "rails", "3.1.8"
|
12
|
+
gem "rails", "~> 3.1.8"
|
13
13
|
gem "jquery-rails"
|
14
14
|
gem "sass-rails"
|
15
15
|
|
data/gemfiles/3.1.gemfile.lock
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
PATH
|
2
2
|
remote: /Users/draper/Dropbox/Development/shoulda-matchers
|
3
3
|
specs:
|
4
|
-
shoulda-matchers (1.
|
4
|
+
shoulda-matchers (1.5.0)
|
5
5
|
activesupport (>= 3.0.0)
|
6
|
-
bourne (~> 1.
|
6
|
+
bourne (~> 1.2.0)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: http://rubygems.org/
|
@@ -36,7 +36,7 @@ GEM
|
|
36
36
|
activesupport (= 3.1.8)
|
37
37
|
activesupport (3.1.8)
|
38
38
|
multi_json (>= 1.0, < 1.3)
|
39
|
-
appraisal (0.
|
39
|
+
appraisal (0.5.1)
|
40
40
|
bundler
|
41
41
|
rake
|
42
42
|
arel (2.2.3)
|
@@ -44,39 +44,38 @@ GEM
|
|
44
44
|
childprocess (~> 0.3.6)
|
45
45
|
cucumber (>= 1.1.1)
|
46
46
|
rspec-expectations (>= 2.7.0)
|
47
|
-
bourne (1.1
|
48
|
-
mocha (= 0.
|
47
|
+
bourne (1.2.1)
|
48
|
+
mocha (= 0.12.7)
|
49
49
|
builder (3.0.4)
|
50
50
|
childprocess (0.3.6)
|
51
51
|
ffi (~> 1.0, >= 1.0.6)
|
52
|
-
cucumber (1.1
|
52
|
+
cucumber (1.2.1)
|
53
53
|
builder (>= 2.1.2)
|
54
|
-
diff-lcs (>= 1.1.
|
55
|
-
gherkin (~> 2.
|
54
|
+
diff-lcs (>= 1.1.3)
|
55
|
+
gherkin (~> 2.11.0)
|
56
56
|
json (>= 1.4.6)
|
57
|
-
term-ansicolor (>= 1.0.6)
|
58
57
|
diff-lcs (1.1.3)
|
59
58
|
erubis (2.7.0)
|
60
|
-
ffi (1.
|
61
|
-
gherkin (2.
|
59
|
+
ffi (1.3.1)
|
60
|
+
gherkin (2.11.5)
|
62
61
|
json (>= 1.4.6)
|
63
62
|
hike (1.2.1)
|
64
63
|
i18n (0.6.1)
|
65
|
-
jquery-rails (2.
|
64
|
+
jquery-rails (2.2.0)
|
66
65
|
railties (>= 3.0, < 5.0)
|
67
66
|
thor (>= 0.14, < 2.0)
|
68
|
-
json (1.7.
|
67
|
+
json (1.7.6)
|
69
68
|
mail (2.3.3)
|
70
69
|
i18n (>= 0.4.0)
|
71
70
|
mime-types (~> 1.16)
|
72
71
|
treetop (~> 1.4.8)
|
73
72
|
metaclass (0.0.1)
|
74
73
|
mime-types (1.19)
|
75
|
-
mocha (0.
|
74
|
+
mocha (0.12.7)
|
76
75
|
metaclass (~> 0.0.1)
|
77
76
|
multi_json (1.2.0)
|
78
77
|
polyglot (0.3.3)
|
79
|
-
rack (1.3.
|
78
|
+
rack (1.3.9)
|
80
79
|
rack-cache (1.2)
|
81
80
|
rack (>= 0.4)
|
82
81
|
rack-mount (0.8.3)
|
@@ -100,7 +99,7 @@ GEM
|
|
100
99
|
rake (>= 0.8.7)
|
101
100
|
rdoc (~> 3.4)
|
102
101
|
thor (~> 0.14.6)
|
103
|
-
rake (0.
|
102
|
+
rake (10.0.3)
|
104
103
|
rdoc (3.12)
|
105
104
|
json (~> 1.4)
|
106
105
|
rspec (2.8.0)
|
@@ -116,19 +115,22 @@ GEM
|
|
116
115
|
activesupport (>= 3.0)
|
117
116
|
railties (>= 3.0)
|
118
117
|
rspec (~> 2.8.0)
|
119
|
-
sass (3.2.
|
118
|
+
sass (3.2.5)
|
120
119
|
sass-rails (3.1.6)
|
121
120
|
actionpack (~> 3.1.0)
|
122
121
|
railties (~> 3.1.0)
|
123
122
|
sass (>= 3.1.10)
|
124
123
|
tilt (~> 1.3.2)
|
125
|
-
shoulda-context (1.0.
|
124
|
+
shoulda-context (1.0.2)
|
126
125
|
sprockets (2.0.4)
|
127
126
|
hike (~> 1.2)
|
128
127
|
rack (~> 1.0)
|
129
128
|
tilt (~> 1.1, != 1.3.0)
|
130
|
-
sqlite3 (1.3.
|
131
|
-
|
129
|
+
sqlite3 (1.3.7)
|
130
|
+
strong_parameters (0.1.6)
|
131
|
+
actionpack (~> 3.0)
|
132
|
+
activemodel (~> 3.0)
|
133
|
+
railties (~> 3.0)
|
132
134
|
thor (0.14.6)
|
133
135
|
tilt (1.3.3)
|
134
136
|
treetop (1.4.12)
|
@@ -142,18 +144,19 @@ PLATFORMS
|
|
142
144
|
DEPENDENCIES
|
143
145
|
activerecord-jdbc-adapter
|
144
146
|
activerecord-jdbcsqlite3-adapter
|
145
|
-
appraisal (~> 0.4
|
147
|
+
appraisal (~> 0.4)
|
146
148
|
aruba
|
147
149
|
bundler (~> 1.1)
|
148
|
-
cucumber (~> 1.1
|
150
|
+
cucumber (~> 1.1)
|
149
151
|
jdbc-sqlite3
|
150
152
|
jquery-rails
|
151
153
|
jruby-openssl
|
152
|
-
rails (
|
153
|
-
rake (
|
154
|
+
rails (~> 3.1.8)
|
155
|
+
rake (>= 0.9.2)
|
154
156
|
rspec-rails (~> 2.8.1)
|
155
157
|
sass-rails
|
156
158
|
shoulda-context (~> 1.0.0)
|
157
159
|
shoulda-matchers!
|
158
160
|
sqlite3
|
161
|
+
strong_parameters
|
159
162
|
therubyrhino
|
data/gemfiles/3.2.gemfile
CHANGED
@@ -9,7 +9,7 @@ gem "activerecord-jdbcsqlite3-adapter", :platform=>:jruby
|
|
9
9
|
gem "jdbc-sqlite3", :platform=>:jruby
|
10
10
|
gem "jruby-openssl", :platform=>:jruby
|
11
11
|
gem "therubyrhino", :platform=>:jruby
|
12
|
-
gem "rails", "3.2.8"
|
12
|
+
gem "rails", "~> 3.2.8"
|
13
13
|
gem "jquery-rails"
|
14
14
|
gem "sass-rails"
|
15
15
|
|
data/gemfiles/3.2.gemfile.lock
CHANGED
@@ -1,41 +1,41 @@
|
|
1
1
|
PATH
|
2
2
|
remote: /Users/draper/Dropbox/Development/shoulda-matchers
|
3
3
|
specs:
|
4
|
-
shoulda-matchers (1.
|
4
|
+
shoulda-matchers (1.5.0)
|
5
5
|
activesupport (>= 3.0.0)
|
6
|
-
bourne (~> 1.
|
6
|
+
bourne (~> 1.2.0)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: http://rubygems.org/
|
10
10
|
specs:
|
11
|
-
actionmailer (3.2.
|
12
|
-
actionpack (= 3.2.
|
11
|
+
actionmailer (3.2.9)
|
12
|
+
actionpack (= 3.2.9)
|
13
13
|
mail (~> 2.4.4)
|
14
|
-
actionpack (3.2.
|
15
|
-
activemodel (= 3.2.
|
16
|
-
activesupport (= 3.2.
|
14
|
+
actionpack (3.2.9)
|
15
|
+
activemodel (= 3.2.9)
|
16
|
+
activesupport (= 3.2.9)
|
17
17
|
builder (~> 3.0.0)
|
18
18
|
erubis (~> 2.7.0)
|
19
19
|
journey (~> 1.0.4)
|
20
20
|
rack (~> 1.4.0)
|
21
21
|
rack-cache (~> 1.2)
|
22
22
|
rack-test (~> 0.6.1)
|
23
|
-
sprockets (~> 2.1
|
24
|
-
activemodel (3.2.
|
25
|
-
activesupport (= 3.2.
|
23
|
+
sprockets (~> 2.2.1)
|
24
|
+
activemodel (3.2.9)
|
25
|
+
activesupport (= 3.2.9)
|
26
26
|
builder (~> 3.0.0)
|
27
|
-
activerecord (3.2.
|
28
|
-
activemodel (= 3.2.
|
29
|
-
activesupport (= 3.2.
|
27
|
+
activerecord (3.2.9)
|
28
|
+
activemodel (= 3.2.9)
|
29
|
+
activesupport (= 3.2.9)
|
30
30
|
arel (~> 3.0.2)
|
31
31
|
tzinfo (~> 0.3.29)
|
32
|
-
activeresource (3.2.
|
33
|
-
activemodel (= 3.2.
|
34
|
-
activesupport (= 3.2.
|
35
|
-
activesupport (3.2.
|
32
|
+
activeresource (3.2.9)
|
33
|
+
activemodel (= 3.2.9)
|
34
|
+
activesupport (= 3.2.9)
|
35
|
+
activesupport (3.2.9)
|
36
36
|
i18n (~> 0.6)
|
37
37
|
multi_json (~> 1.0)
|
38
|
-
appraisal (0.
|
38
|
+
appraisal (0.5.1)
|
39
39
|
bundler
|
40
40
|
rake
|
41
41
|
arel (3.0.2)
|
@@ -43,62 +43,61 @@ GEM
|
|
43
43
|
childprocess (~> 0.3.6)
|
44
44
|
cucumber (>= 1.1.1)
|
45
45
|
rspec-expectations (>= 2.7.0)
|
46
|
-
bourne (1.1
|
47
|
-
mocha (= 0.
|
46
|
+
bourne (1.2.1)
|
47
|
+
mocha (= 0.12.7)
|
48
48
|
builder (3.0.4)
|
49
49
|
childprocess (0.3.6)
|
50
50
|
ffi (~> 1.0, >= 1.0.6)
|
51
|
-
cucumber (1.1
|
51
|
+
cucumber (1.2.1)
|
52
52
|
builder (>= 2.1.2)
|
53
|
-
diff-lcs (>= 1.1.
|
54
|
-
gherkin (~> 2.
|
53
|
+
diff-lcs (>= 1.1.3)
|
54
|
+
gherkin (~> 2.11.0)
|
55
55
|
json (>= 1.4.6)
|
56
|
-
term-ansicolor (>= 1.0.6)
|
57
56
|
diff-lcs (1.1.3)
|
58
57
|
erubis (2.7.0)
|
59
|
-
ffi (1.
|
60
|
-
gherkin (2.
|
58
|
+
ffi (1.3.1)
|
59
|
+
gherkin (2.11.5)
|
61
60
|
json (>= 1.4.6)
|
62
61
|
hike (1.2.1)
|
63
62
|
i18n (0.6.1)
|
64
63
|
journey (1.0.4)
|
65
|
-
jquery-rails (2.
|
64
|
+
jquery-rails (2.2.0)
|
66
65
|
railties (>= 3.0, < 5.0)
|
67
66
|
thor (>= 0.14, < 2.0)
|
68
|
-
json (1.7.
|
67
|
+
json (1.7.6)
|
69
68
|
mail (2.4.4)
|
70
69
|
i18n (>= 0.4.0)
|
71
70
|
mime-types (~> 1.16)
|
72
71
|
treetop (~> 1.4.8)
|
73
72
|
metaclass (0.0.1)
|
74
73
|
mime-types (1.19)
|
75
|
-
mocha (0.
|
74
|
+
mocha (0.12.7)
|
76
75
|
metaclass (~> 0.0.1)
|
77
|
-
multi_json (1.
|
76
|
+
multi_json (1.5.0)
|
78
77
|
polyglot (0.3.3)
|
79
|
-
rack (1.4.
|
78
|
+
rack (1.4.4)
|
80
79
|
rack-cache (1.2)
|
81
80
|
rack (>= 0.4)
|
82
81
|
rack-ssl (1.3.2)
|
83
82
|
rack
|
84
83
|
rack-test (0.6.2)
|
85
84
|
rack (>= 1.0)
|
86
|
-
rails (3.2.
|
87
|
-
actionmailer (= 3.2.
|
88
|
-
actionpack (= 3.2.
|
89
|
-
activerecord (= 3.2.
|
90
|
-
activeresource (= 3.2.
|
91
|
-
activesupport (= 3.2.
|
85
|
+
rails (3.2.9)
|
86
|
+
actionmailer (= 3.2.9)
|
87
|
+
actionpack (= 3.2.9)
|
88
|
+
activerecord (= 3.2.9)
|
89
|
+
activeresource (= 3.2.9)
|
90
|
+
activesupport (= 3.2.9)
|
92
91
|
bundler (~> 1.0)
|
93
|
-
railties (= 3.2.
|
94
|
-
railties (3.2.
|
95
|
-
actionpack (= 3.2.
|
96
|
-
activesupport (= 3.2.
|
92
|
+
railties (= 3.2.9)
|
93
|
+
railties (3.2.9)
|
94
|
+
actionpack (= 3.2.9)
|
95
|
+
activesupport (= 3.2.9)
|
97
96
|
rack-ssl (~> 1.3.2)
|
98
97
|
rake (>= 0.8.7)
|
99
98
|
rdoc (~> 3.4)
|
100
99
|
thor (>= 0.14.6, < 2.0)
|
101
|
-
rake (0.
|
100
|
+
rake (10.0.3)
|
102
101
|
rdoc (3.12)
|
103
102
|
json (~> 1.4)
|
104
103
|
rspec (2.8.0)
|
@@ -114,18 +113,22 @@ GEM
|
|
114
113
|
activesupport (>= 3.0)
|
115
114
|
railties (>= 3.0)
|
116
115
|
rspec (~> 2.8.0)
|
117
|
-
sass (3.2.
|
118
|
-
sass-rails (3.2.
|
116
|
+
sass (3.2.5)
|
117
|
+
sass-rails (3.2.6)
|
119
118
|
railties (~> 3.2.0)
|
120
119
|
sass (>= 3.1.10)
|
121
120
|
tilt (~> 1.3)
|
122
|
-
shoulda-context (1.0.
|
123
|
-
sprockets (2.
|
121
|
+
shoulda-context (1.0.2)
|
122
|
+
sprockets (2.2.2)
|
124
123
|
hike (~> 1.2)
|
124
|
+
multi_json (~> 1.0)
|
125
125
|
rack (~> 1.0)
|
126
126
|
tilt (~> 1.1, != 1.3.0)
|
127
|
-
sqlite3 (1.3.
|
128
|
-
|
127
|
+
sqlite3 (1.3.7)
|
128
|
+
strong_parameters (0.1.6)
|
129
|
+
actionpack (~> 3.0)
|
130
|
+
activemodel (~> 3.0)
|
131
|
+
railties (~> 3.0)
|
129
132
|
thor (0.16.0)
|
130
133
|
tilt (1.3.3)
|
131
134
|
treetop (1.4.12)
|
@@ -139,18 +142,19 @@ PLATFORMS
|
|
139
142
|
DEPENDENCIES
|
140
143
|
activerecord-jdbc-adapter
|
141
144
|
activerecord-jdbcsqlite3-adapter
|
142
|
-
appraisal (~> 0.4
|
145
|
+
appraisal (~> 0.4)
|
143
146
|
aruba
|
144
147
|
bundler (~> 1.1)
|
145
|
-
cucumber (~> 1.1
|
148
|
+
cucumber (~> 1.1)
|
146
149
|
jdbc-sqlite3
|
147
150
|
jquery-rails
|
148
151
|
jruby-openssl
|
149
|
-
rails (
|
150
|
-
rake (
|
152
|
+
rails (~> 3.2.8)
|
153
|
+
rake (>= 0.9.2)
|
151
154
|
rspec-rails (~> 2.8.1)
|
152
155
|
sass-rails
|
153
156
|
shoulda-context (~> 1.0.0)
|
154
157
|
shoulda-matchers!
|
155
158
|
sqlite3
|
159
|
+
strong_parameters
|
156
160
|
therubyrhino
|
@@ -8,6 +8,7 @@ require 'shoulda/matchers/action_controller/set_session_matcher'
|
|
8
8
|
require 'shoulda/matchers/action_controller/route_matcher'
|
9
9
|
require 'shoulda/matchers/action_controller/redirect_to_matcher'
|
10
10
|
require 'shoulda/matchers/action_controller/render_template_matcher'
|
11
|
+
require 'shoulda/matchers/action_controller/strong_parameters_matcher'
|
11
12
|
|
12
13
|
module Shoulda
|
13
14
|
module Matchers
|
@@ -16,7 +17,7 @@ module Shoulda
|
|
16
17
|
#
|
17
18
|
# This code segment:
|
18
19
|
#
|
19
|
-
# describe UsersController,
|
20
|
+
# describe UsersController, 'on GET to show with a valid id' do
|
20
21
|
# before(:each) do
|
21
22
|
# get :show, :id => User.first.to_param
|
22
23
|
# end
|
@@ -26,7 +27,7 @@ module Shoulda
|
|
26
27
|
# it { should render_template(:show) }
|
27
28
|
# it { should not_set_the_flash) }
|
28
29
|
#
|
29
|
-
# it
|
30
|
+
# it 'does something else really cool' do
|
30
31
|
# assigns[:user].id.should == 1
|
31
32
|
# end
|
32
33
|
# end
|
@@ -1,7 +1,8 @@
|
|
1
|
+
require 'active_support/deprecation'
|
2
|
+
|
1
3
|
module Shoulda # :nodoc:
|
2
4
|
module Matchers
|
3
5
|
module ActionController # :nodoc:
|
4
|
-
|
5
6
|
# Ensures that the controller assigned to the named instance variable.
|
6
7
|
#
|
7
8
|
# Options:
|
@@ -20,9 +21,10 @@ module Shoulda # :nodoc:
|
|
20
21
|
end
|
21
22
|
|
22
23
|
class AssignToMatcher # :nodoc:
|
23
|
-
attr_reader :
|
24
|
+
attr_reader :failure_message_for_should, :failure_message_for_should_not
|
24
25
|
|
25
26
|
def initialize(variable)
|
27
|
+
ActiveSupport::Deprecation.warn 'The assign_to matcher is deprecated and will be removed in 2.0'
|
26
28
|
@variable = variable.to_s
|
27
29
|
@options = {}
|
28
30
|
@options[:check_value] = false
|
@@ -65,12 +67,12 @@ module Shoulda # :nodoc:
|
|
65
67
|
|
66
68
|
def assigned_value?
|
67
69
|
if @controller.instance_variables.map(&:to_s).include?("@#{@variable}")
|
68
|
-
@
|
70
|
+
@failure_message_for_should_not =
|
69
71
|
"Didn't expect action to assign a value for @#{@variable}, " <<
|
70
72
|
"but it was assigned to #{assigned_value.inspect}"
|
71
73
|
true
|
72
74
|
else
|
73
|
-
@
|
75
|
+
@failure_message_for_should =
|
74
76
|
"Expected action to assign a value for @#{@variable}"
|
75
77
|
false
|
76
78
|
end
|
@@ -79,12 +81,12 @@ module Shoulda # :nodoc:
|
|
79
81
|
def kind_of_expected_class?
|
80
82
|
if @options.key?(:expected_class)
|
81
83
|
if assigned_value.kind_of?(@options[:expected_class])
|
82
|
-
@
|
84
|
+
@failure_message_for_should_not =
|
83
85
|
"Didn't expect action to assign a kind of #{@options[:expected_class]} " <<
|
84
86
|
"for #{@variable}, but got one anyway"
|
85
87
|
true
|
86
88
|
else
|
87
|
-
@
|
89
|
+
@failure_message_for_should =
|
88
90
|
"Expected action to assign a kind of #{@options[:expected_class]} " <<
|
89
91
|
"for #{@variable}, but got #{assigned_value.inspect} " <<
|
90
92
|
"(#{assigned_value.class.name})"
|
@@ -98,12 +100,12 @@ module Shoulda # :nodoc:
|
|
98
100
|
def equal_to_expected_value?
|
99
101
|
if @options[:check_value]
|
100
102
|
if @options[:expected_value] == assigned_value
|
101
|
-
@
|
103
|
+
@failure_message_for_should_not =
|
102
104
|
"Didn't expect action to assign #{@options[:expected_value].inspect} " <<
|
103
105
|
"for #{@variable}, but got it anyway"
|
104
106
|
true
|
105
107
|
else
|
106
|
-
@
|
108
|
+
@failure_message_for_should =
|
107
109
|
"Expected action to assign #{@options[:expected_value].inspect} " <<
|
108
110
|
"for #{@variable}, but got #{assigned_value.inspect}"
|
109
111
|
false
|
@@ -1,7 +1,6 @@
|
|
1
1
|
module Shoulda # :nodoc:
|
2
2
|
module Matchers
|
3
3
|
module ActionController # :nodoc:
|
4
|
-
|
5
4
|
# Ensures that filter_parameter_logging is set for the specified key.
|
6
5
|
#
|
7
6
|
# Example:
|
@@ -17,15 +16,14 @@ module Shoulda # :nodoc:
|
|
17
16
|
end
|
18
17
|
|
19
18
|
def matches?(controller)
|
20
|
-
@controller = controller
|
21
19
|
filters_key?
|
22
20
|
end
|
23
21
|
|
24
|
-
def
|
22
|
+
def failure_message_for_should
|
25
23
|
"Expected #{@key} to be filtered; filtered keys: #{filtered_keys.join(', ')}"
|
26
24
|
end
|
27
25
|
|
28
|
-
def
|
26
|
+
def failure_message_for_should_not
|
29
27
|
"Did not expect #{@key} to be filtered"
|
30
28
|
end
|
31
29
|
|