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.
Files changed (135) hide show
  1. data/.travis.yml +11 -3
  2. data/Appraisals +3 -3
  3. data/Gemfile +1 -1
  4. data/Gemfile.lock +69 -70
  5. data/MIT-LICENSE +1 -1
  6. data/NEWS.md +22 -4
  7. data/README.md +3 -1
  8. data/Rakefile +9 -5
  9. data/features/step_definitions/rails_steps.rb +7 -7
  10. data/features/support/env.rb +1 -1
  11. data/gemfiles/3.0.gemfile +1 -1
  12. data/gemfiles/3.0.gemfile.lock +25 -22
  13. data/gemfiles/3.1.gemfile +1 -1
  14. data/gemfiles/3.1.gemfile.lock +27 -24
  15. data/gemfiles/3.2.gemfile +1 -1
  16. data/gemfiles/3.2.gemfile.lock +56 -52
  17. data/lib/shoulda/matchers/action_controller.rb +3 -2
  18. data/lib/shoulda/matchers/action_controller/assign_to_matcher.rb +10 -8
  19. data/lib/shoulda/matchers/action_controller/filter_param_matcher.rb +2 -4
  20. data/lib/shoulda/matchers/action_controller/redirect_to_matcher.rb +3 -4
  21. data/lib/shoulda/matchers/action_controller/render_template_matcher.rb +3 -4
  22. data/lib/shoulda/matchers/action_controller/render_with_layout_matcher.rb +6 -6
  23. data/lib/shoulda/matchers/action_controller/respond_with_content_type_matcher.rb +5 -2
  24. data/lib/shoulda/matchers/action_controller/respond_with_matcher.rb +2 -2
  25. data/lib/shoulda/matchers/action_controller/route_matcher.rb +12 -12
  26. data/lib/shoulda/matchers/action_controller/set_session_matcher.rb +3 -4
  27. data/lib/shoulda/matchers/action_controller/set_the_flash_matcher.rb +10 -11
  28. data/lib/shoulda/matchers/action_controller/strong_parameters_matcher.rb +121 -0
  29. data/lib/shoulda/matchers/action_mailer/have_sent_email_matcher.rb +7 -4
  30. data/lib/shoulda/matchers/active_model.rb +1 -1
  31. data/lib/shoulda/matchers/active_model/allow_mass_assignment_of_matcher.rb +8 -8
  32. data/lib/shoulda/matchers/active_model/allow_value_matcher.rb +5 -4
  33. data/lib/shoulda/matchers/active_model/disallow_value_matcher.rb +3 -3
  34. data/lib/shoulda/matchers/active_model/ensure_inclusion_of_matcher.rb +2 -2
  35. data/lib/shoulda/matchers/active_model/exception_message_finder.rb +0 -1
  36. data/lib/shoulda/matchers/active_model/helpers.rb +16 -7
  37. data/lib/shoulda/matchers/active_model/only_integer_matcher.rb +3 -3
  38. data/lib/shoulda/matchers/active_model/validate_confirmation_of_matcher.rb +8 -6
  39. data/lib/shoulda/matchers/active_model/validate_format_of_matcher.rb +19 -10
  40. data/lib/shoulda/matchers/active_model/validate_numericality_of_matcher.rb +4 -4
  41. data/lib/shoulda/matchers/active_model/validate_uniqueness_of_matcher.rb +19 -21
  42. data/lib/shoulda/matchers/active_model/validation_matcher.rb +7 -7
  43. data/lib/shoulda/matchers/active_model/validation_message_finder.rb +1 -1
  44. data/lib/shoulda/matchers/active_record/accept_nested_attributes_for_matcher.rb +5 -5
  45. data/lib/shoulda/matchers/active_record/association_matcher.rb +3 -3
  46. data/lib/shoulda/matchers/active_record/have_db_column_matcher.rb +11 -7
  47. data/lib/shoulda/matchers/active_record/have_db_index_matcher.rb +2 -2
  48. data/lib/shoulda/matchers/active_record/have_readonly_attribute_matcher.rb +5 -5
  49. data/lib/shoulda/matchers/active_record/query_the_database_matcher.rb +5 -2
  50. data/lib/shoulda/matchers/active_record/serialize_matcher.rb +3 -3
  51. data/lib/shoulda/matchers/assertion_error.rb +4 -1
  52. data/lib/shoulda/matchers/independent/delegate_matcher.rb +17 -7
  53. data/lib/shoulda/matchers/integrations/rspec.rb +19 -33
  54. data/lib/shoulda/matchers/version.rb +1 -1
  55. data/shoulda-matchers.gemspec +6 -4
  56. data/spec/shoulda/matchers/action_controller/assign_to_matcher_spec.rb +66 -0
  57. data/spec/shoulda/matchers/action_controller/filter_param_matcher_spec.rb +22 -0
  58. data/spec/shoulda/matchers/action_controller/redirect_to_matcher_spec.rb +42 -0
  59. data/spec/shoulda/matchers/action_controller/render_template_matcher_spec.rb +78 -0
  60. data/spec/shoulda/matchers/action_controller/render_with_layout_matcher_spec.rb +58 -0
  61. data/spec/shoulda/matchers/action_controller/respond_with_content_type_matcher_spec.rb +31 -0
  62. data/spec/shoulda/matchers/action_controller/respond_with_matcher_spec.rb +31 -0
  63. data/spec/shoulda/matchers/action_controller/route_matcher_spec.rb +65 -0
  64. data/spec/shoulda/matchers/action_controller/set_session_matcher_spec.rb +51 -0
  65. data/spec/shoulda/matchers/action_controller/set_the_flash_matcher_spec.rb +153 -0
  66. data/spec/shoulda/matchers/action_controller/strong_parameters_matcher_spec.rb +142 -0
  67. data/spec/shoulda/matchers/action_mailer/have_sent_email_spec.rb +324 -0
  68. data/spec/shoulda/matchers/active_model/allow_mass_assignment_of_matcher_spec.rb +111 -0
  69. data/spec/shoulda/matchers/active_model/allow_value_matcher_spec.rb +124 -0
  70. data/spec/shoulda/matchers/active_model/disallow_value_matcher_spec.rb +43 -0
  71. data/spec/shoulda/matchers/active_model/ensure_exclusion_of_matcher_spec.rb +74 -0
  72. data/spec/shoulda/matchers/active_model/ensure_inclusion_of_matcher_spec.rb +171 -0
  73. data/spec/shoulda/matchers/active_model/ensure_length_of_matcher_spec.rb +113 -0
  74. data/spec/shoulda/{active_model → matchers/active_model}/exception_message_finder_spec.rb +2 -2
  75. data/spec/shoulda/matchers/active_model/helpers_spec.rb +158 -0
  76. data/spec/shoulda/matchers/active_model/only_integer_matcher_spec.rb +52 -0
  77. data/spec/shoulda/matchers/active_model/validate_acceptance_of_matcher_spec.rb +41 -0
  78. data/spec/shoulda/matchers/active_model/validate_confirmation_of_matcher_spec.rb +41 -0
  79. data/spec/shoulda/matchers/active_model/validate_format_of_matcher_spec.rb +75 -0
  80. data/spec/shoulda/matchers/active_model/validate_numericality_of_matcher_spec.rb +73 -0
  81. data/spec/shoulda/matchers/active_model/validate_presence_of_matcher_spec.rb +127 -0
  82. data/spec/shoulda/matchers/active_model/validate_uniqueness_of_matcher_spec.rb +175 -0
  83. data/spec/shoulda/{active_model → matchers/active_model}/validation_message_finder_spec.rb +0 -1
  84. data/spec/shoulda/matchers/active_record/accept_nested_attributes_for_matcher_spec.rb +106 -0
  85. data/spec/shoulda/matchers/active_record/association_matcher_spec.rb +534 -0
  86. data/spec/shoulda/matchers/active_record/have_db_column_matcher_spec.rb +111 -0
  87. data/spec/shoulda/matchers/active_record/have_db_index_matcher_spec.rb +78 -0
  88. data/spec/shoulda/matchers/active_record/have_readonly_attributes_matcher_spec.rb +41 -0
  89. data/spec/shoulda/{active_record → matchers/active_record}/query_the_database_matcher_spec.rb +10 -10
  90. data/spec/shoulda/matchers/active_record/serialize_matcher_spec.rb +86 -0
  91. data/spec/shoulda/{independent → matchers/independent}/delegate_matcher_spec.rb +55 -34
  92. data/spec/spec_helper.rb +1 -2
  93. data/spec/support/active_model_versions.rb +4 -0
  94. data/spec/support/activemodel_helpers.rb +19 -0
  95. data/spec/support/controller_builder.rb +38 -12
  96. data/spec/support/model_builder.rb +8 -2
  97. metadata +106 -98
  98. data/spec/fixtures/addresses.yml +0 -3
  99. data/spec/fixtures/friendships.yml +0 -0
  100. data/spec/fixtures/posts.yml +0 -5
  101. data/spec/fixtures/products.yml +0 -0
  102. data/spec/fixtures/taggings.yml +0 -0
  103. data/spec/fixtures/tags.yml +0 -9
  104. data/spec/fixtures/users.yml +0 -6
  105. data/spec/shoulda/action_controller/assign_to_matcher_spec.rb +0 -63
  106. data/spec/shoulda/action_controller/filter_param_matcher_spec.rb +0 -20
  107. data/spec/shoulda/action_controller/redirect_to_matcher_spec.rb +0 -40
  108. data/spec/shoulda/action_controller/render_template_matcher_spec.rb +0 -69
  109. data/spec/shoulda/action_controller/render_with_layout_matcher_spec.rb +0 -55
  110. data/spec/shoulda/action_controller/respond_with_content_type_matcher_spec.rb +0 -28
  111. data/spec/shoulda/action_controller/respond_with_matcher_spec.rb +0 -83
  112. data/spec/shoulda/action_controller/route_matcher_spec.rb +0 -65
  113. data/spec/shoulda/action_controller/set_session_matcher_spec.rb +0 -46
  114. data/spec/shoulda/action_controller/set_the_flash_matcher_spec.rb +0 -130
  115. data/spec/shoulda/action_mailer/have_sent_email_spec.rb +0 -333
  116. data/spec/shoulda/active_model/allow_mass_assignment_of_matcher_spec.rb +0 -115
  117. data/spec/shoulda/active_model/allow_value_matcher_spec.rb +0 -131
  118. data/spec/shoulda/active_model/disallow_value_matcher_spec.rb +0 -65
  119. data/spec/shoulda/active_model/ensure_exclusion_of_matcher_spec.rb +0 -79
  120. data/spec/shoulda/active_model/ensure_inclusion_of_matcher_spec.rb +0 -181
  121. data/spec/shoulda/active_model/ensure_length_of_matcher_spec.rb +0 -138
  122. data/spec/shoulda/active_model/helpers_spec.rb +0 -129
  123. data/spec/shoulda/active_model/only_integer_matcher_spec.rb +0 -69
  124. data/spec/shoulda/active_model/validate_acceptance_of_matcher_spec.rb +0 -43
  125. data/spec/shoulda/active_model/validate_confirmation_of_matcher_spec.rb +0 -48
  126. data/spec/shoulda/active_model/validate_format_of_matcher_spec.rb +0 -79
  127. data/spec/shoulda/active_model/validate_numericality_of_matcher_spec.rb +0 -112
  128. data/spec/shoulda/active_model/validate_presence_of_matcher_spec.rb +0 -135
  129. data/spec/shoulda/active_model/validate_uniqueness_of_matcher_spec.rb +0 -154
  130. data/spec/shoulda/active_record/accept_nested_attributes_for_matcher_spec.rb +0 -84
  131. data/spec/shoulda/active_record/association_matcher_spec.rb +0 -642
  132. data/spec/shoulda/active_record/have_db_column_matcher_spec.rb +0 -185
  133. data/spec/shoulda/active_record/have_db_index_matcher_spec.rb +0 -105
  134. data/spec/shoulda/active_record/have_readonly_attributes_matcher_spec.rb +0 -46
  135. data/spec/shoulda/active_record/serialize_matcher_spec.rb +0 -81
@@ -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
 
@@ -1,9 +1,9 @@
1
1
  PATH
2
2
  remote: /Users/draper/Dropbox/Development/shoulda-matchers
3
3
  specs:
4
- shoulda-matchers (1.4.1)
4
+ shoulda-matchers (1.5.0)
5
5
  activesupport (>= 3.0.0)
6
- bourne (~> 1.1.2)
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.4.1)
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.2)
48
- mocha (= 0.10.5)
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.9)
52
+ cucumber (1.2.1)
53
53
  builder (>= 2.1.2)
54
- diff-lcs (>= 1.1.2)
55
- gherkin (~> 2.9.0)
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.2.0)
61
- gherkin (2.9.3)
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.1.4)
64
+ jquery-rails (2.2.0)
66
65
  railties (>= 3.0, < 5.0)
67
66
  thor (>= 0.14, < 2.0)
68
- json (1.7.5)
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.10.5)
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.6)
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.9.5)
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.3)
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.1)
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.6)
131
- term-ansicolor (1.0.7)
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.0)
147
+ appraisal (~> 0.4)
146
148
  aruba
147
149
  bundler (~> 1.1)
148
- cucumber (~> 1.1.9)
150
+ cucumber (~> 1.1)
149
151
  jdbc-sqlite3
150
152
  jquery-rails
151
153
  jruby-openssl
152
- rails (= 3.1.8)
153
- rake (~> 0.9.2)
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
@@ -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
 
@@ -1,41 +1,41 @@
1
1
  PATH
2
2
  remote: /Users/draper/Dropbox/Development/shoulda-matchers
3
3
  specs:
4
- shoulda-matchers (1.4.1)
4
+ shoulda-matchers (1.5.0)
5
5
  activesupport (>= 3.0.0)
6
- bourne (~> 1.1.2)
6
+ bourne (~> 1.2.0)
7
7
 
8
8
  GEM
9
9
  remote: http://rubygems.org/
10
10
  specs:
11
- actionmailer (3.2.8)
12
- actionpack (= 3.2.8)
11
+ actionmailer (3.2.9)
12
+ actionpack (= 3.2.9)
13
13
  mail (~> 2.4.4)
14
- actionpack (3.2.8)
15
- activemodel (= 3.2.8)
16
- activesupport (= 3.2.8)
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.3)
24
- activemodel (3.2.8)
25
- activesupport (= 3.2.8)
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.8)
28
- activemodel (= 3.2.8)
29
- activesupport (= 3.2.8)
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.8)
33
- activemodel (= 3.2.8)
34
- activesupport (= 3.2.8)
35
- activesupport (3.2.8)
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.4.1)
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.2)
47
- mocha (= 0.10.5)
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.9)
51
+ cucumber (1.2.1)
52
52
  builder (>= 2.1.2)
53
- diff-lcs (>= 1.1.2)
54
- gherkin (~> 2.9.0)
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.2.0)
60
- gherkin (2.9.3)
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.1.4)
64
+ jquery-rails (2.2.0)
66
65
  railties (>= 3.0, < 5.0)
67
66
  thor (>= 0.14, < 2.0)
68
- json (1.7.5)
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.10.5)
74
+ mocha (0.12.7)
76
75
  metaclass (~> 0.0.1)
77
- multi_json (1.3.7)
76
+ multi_json (1.5.0)
78
77
  polyglot (0.3.3)
79
- rack (1.4.1)
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.8)
87
- actionmailer (= 3.2.8)
88
- actionpack (= 3.2.8)
89
- activerecord (= 3.2.8)
90
- activeresource (= 3.2.8)
91
- activesupport (= 3.2.8)
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.8)
94
- railties (3.2.8)
95
- actionpack (= 3.2.8)
96
- activesupport (= 3.2.8)
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.9.5)
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.3)
118
- sass-rails (3.2.5)
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.1)
123
- sprockets (2.1.3)
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.6)
128
- term-ansicolor (1.0.7)
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.0)
145
+ appraisal (~> 0.4)
143
146
  aruba
144
147
  bundler (~> 1.1)
145
- cucumber (~> 1.1.9)
148
+ cucumber (~> 1.1)
146
149
  jdbc-sqlite3
147
150
  jquery-rails
148
151
  jruby-openssl
149
- rails (= 3.2.8)
150
- rake (~> 0.9.2)
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, "on GET to show with a valid id" do
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 "should do something else really cool" do
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 :failure_message, :negative_failure_message
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
- @negative_failure_message =
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
- @failure_message =
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
- @negative_failure_message =
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
- @failure_message =
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
- @negative_failure_message =
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
- @failure_message =
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 failure_message
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 negative_failure_message
26
+ def failure_message_for_should_not
29
27
  "Did not expect #{@key} to be filtered"
30
28
  end
31
29