rspec-rails 1.1.12 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (124) hide show
  1. data/.document +7 -0
  2. data/History.txt +55 -0
  3. data/License.txt +1 -1
  4. data/Manifest.txt +53 -48
  5. data/README.txt +5 -4
  6. data/Rakefile +9 -2
  7. data/TODO.txt +1 -0
  8. data/Upgrade.markdown +103 -0
  9. data/generators/rspec/rspec_generator.rb +1 -0
  10. data/generators/rspec/templates/rspec.rake +134 -111
  11. data/generators/rspec/templates/script/autospec +1 -0
  12. data/generators/rspec/templates/script/spec +21 -4
  13. data/generators/rspec/templates/script/spec_server +34 -107
  14. data/generators/rspec/templates/spec_helper.rb +1 -1
  15. data/generators/rspec_controller/rspec_controller_generator.rb +1 -5
  16. data/generators/rspec_scaffold/rspec_scaffold_generator.rb +13 -17
  17. data/generators/rspec_scaffold/templates/controller_spec.rb +27 -29
  18. data/generators/rspec_scaffold/templates/edit_erb_spec.rb +2 -2
  19. data/generators/rspec_scaffold/templates/helper_spec.rb +1 -1
  20. data/generators/rspec_scaffold/templates/index_erb_spec.rb +2 -2
  21. data/generators/rspec_scaffold/templates/new_erb_spec.rb +2 -2
  22. data/generators/rspec_scaffold/templates/routing_spec.rb +24 -20
  23. data/generators/rspec_scaffold/templates/show_erb_spec.rb +2 -2
  24. data/lib/spec/rails.rb +10 -9
  25. data/lib/spec/rails/example.rb +2 -2
  26. data/lib/spec/rails/example/assigns_hash_proxy.rb +1 -2
  27. data/lib/spec/rails/example/controller_example_group.rb +117 -123
  28. data/lib/spec/rails/example/functional_example_group.rb +7 -22
  29. data/lib/spec/rails/example/helper_example_group.rb +15 -33
  30. data/lib/spec/rails/example/model_example_group.rb +1 -1
  31. data/lib/spec/rails/example/render_observer.rb +0 -26
  32. data/lib/spec/rails/example/routing_example_group.rb +13 -0
  33. data/lib/spec/rails/example/routing_helpers.rb +68 -0
  34. data/lib/spec/rails/example/view_example_group.rb +50 -47
  35. data/lib/spec/rails/extensions.rb +2 -1
  36. data/lib/spec/rails/extensions/action_controller/rescue.rb +25 -8
  37. data/lib/spec/rails/extensions/action_controller/test_case.rb +16 -0
  38. data/lib/spec/rails/extensions/action_controller/test_response.rb +4 -3
  39. data/lib/spec/rails/extensions/action_view/base.rb +9 -9
  40. data/lib/spec/rails/extensions/active_record/base.rb +39 -23
  41. data/lib/spec/rails/extensions/active_support/test_case.rb +7 -0
  42. data/lib/spec/rails/extensions/spec/matchers/have.rb +8 -6
  43. data/lib/spec/rails/extensions/spec/runner/configuration.rb +12 -44
  44. data/lib/spec/rails/matchers/ar_be_valid.rb +8 -5
  45. data/lib/spec/rails/matchers/assert_select.rb +36 -21
  46. data/lib/spec/rails/matchers/have_text.rb +3 -3
  47. data/lib/spec/rails/matchers/include_text.rb +4 -4
  48. data/lib/spec/rails/matchers/redirect_to.rb +30 -19
  49. data/lib/spec/rails/matchers/render_template.rb +7 -3
  50. data/lib/spec/rails/mocks.rb +1 -1
  51. data/lib/spec/rails/spec_server.rb +97 -0
  52. data/lib/spec/rails/story_adapter.rb +4 -4
  53. data/lib/spec/rails/version.rb +2 -2
  54. data/spec/resources/controllers/controller_spec_controller.rb +14 -6
  55. data/spec/resources/controllers/example.txt +1 -0
  56. data/spec/resources/controllers/redirect_spec_controller.rb +4 -0
  57. data/spec/resources/controllers/render_spec_controller.rb +1 -1
  58. data/spec/resources/controllers/rjs_spec_controller.rb +1 -1
  59. data/spec/resources/helpers/explicit_helper.rb +1 -1
  60. data/spec/resources/views/controller_spec/{_partial.rhtml → _partial.html.erb} +0 -0
  61. data/spec/resources/views/controller_spec/{action_setting_flash_after_session_reset.rhtml → action_setting_flash_after_session_reset.html.erb} +0 -0
  62. data/spec/resources/views/controller_spec/{action_setting_flash_before_session_reset.rhtml → action_setting_flash_before_session_reset.html.erb} +0 -0
  63. data/spec/resources/views/controller_spec/{action_setting_the_assigns_hash.rhtml → action_setting_the_assigns_hash.html.erb} +0 -0
  64. data/spec/resources/views/controller_spec/{action_with_errors_in_template.rhtml → action_with_errors_in_template.html.erb} +0 -0
  65. data/spec/resources/views/controller_spec/{action_with_template.rhtml → action_with_template.html.erb} +0 -0
  66. data/spec/resources/views/layouts/{application.rhtml → application.html.erb} +0 -0
  67. data/spec/resources/views/layouts/{simple.rhtml → simple.html.erb} +0 -0
  68. data/spec/resources/views/render_spec/{_a_partial.rhtml → _a_partial.html.erb} +0 -0
  69. data/spec/resources/views/render_spec/{action_with_alternate_layout.rhtml → action_with_alternate_layout.html.erb} +0 -0
  70. data/spec/resources/views/rjs_spec/{_replacement_partial.rhtml → _replacement_partial.html.erb} +0 -0
  71. data/spec/resources/views/rjs_spec/{hide_div.rjs → hide_div.js.rjs} +0 -0
  72. data/spec/resources/views/rjs_spec/{hide_page_element.rjs → hide_page_element.js.rjs} +0 -0
  73. data/spec/resources/views/rjs_spec/{insert_html.rjs → insert_html.js.rjs} +0 -0
  74. data/spec/resources/views/rjs_spec/{replace.rjs → replace.js.rjs} +0 -0
  75. data/spec/resources/views/rjs_spec/{replace_html.rjs → replace_html.js.rjs} +0 -0
  76. data/spec/resources/views/rjs_spec/{replace_html_with_partial.rjs → replace_html_with_partial.js.rjs} +0 -0
  77. data/spec/resources/views/rjs_spec/{visual_effect.rjs → visual_effect.js.rjs} +0 -0
  78. data/spec/resources/views/rjs_spec/{visual_toggle_effect.rjs → visual_toggle_effect.js.rjs} +0 -0
  79. data/spec/resources/views/tag_spec/{no_tags.rhtml → no_tags.html.erb} +0 -0
  80. data/spec/resources/views/tag_spec/{single_div_with_no_attributes.rhtml → single_div_with_no_attributes.html.erb} +0 -0
  81. data/spec/resources/views/tag_spec/{single_div_with_one_attribute.rhtml → single_div_with_one_attribute.html.erb} +0 -0
  82. data/spec/resources/views/view_spec/{_partial.rhtml → _partial.html.erb} +0 -0
  83. data/spec/resources/views/view_spec/{_partial_used_twice.rhtml → _partial_used_twice.html.erb} +0 -0
  84. data/spec/resources/views/view_spec/{_partial_with_local_variable.rhtml → _partial_with_local_variable.html.erb} +0 -0
  85. data/spec/resources/views/view_spec/{_partial_with_sub_partial.rhtml → _partial_with_sub_partial.html.erb} +0 -0
  86. data/spec/resources/views/view_spec/{_spacer.rhtml → _spacer.html.erb} +0 -0
  87. data/spec/resources/views/view_spec/{accessor.rhtml → accessor.html.erb} +0 -0
  88. data/spec/resources/views/view_spec/{block_helper.rhtml → block_helper.html.erb} +0 -0
  89. data/spec/resources/views/view_spec/{entry_form.rhtml → entry_form.html.erb} +0 -0
  90. data/spec/resources/views/view_spec/{explicit_helper.rhtml → explicit_helper.html.erb} +0 -0
  91. data/spec/resources/views/view_spec/foo/{show.rhtml → show.html.erb} +0 -0
  92. data/spec/resources/views/view_spec/{implicit_helper.rhtml → implicit_helper.html.erb} +0 -0
  93. data/spec/resources/views/view_spec/{multiple_helpers.rhtml → multiple_helpers.html.erb} +0 -0
  94. data/spec/resources/views/view_spec/{should_not_receive.rhtml → should_not_receive.html.erb} +0 -0
  95. data/spec/resources/views/view_spec/{template_with_partial.rhtml → template_with_partial.html.erb} +0 -0
  96. data/spec/resources/views/view_spec/{template_with_partial_using_collection.rhtml → template_with_partial_using_collection.html.erb} +0 -0
  97. data/spec/resources/views/view_spec/{template_with_partial_with_array.rhtml → template_with_partial_with_array.html.erb} +0 -0
  98. data/spec/spec/rails/example/assigns_hash_proxy_spec.rb +18 -5
  99. data/spec/spec/rails/example/configuration_spec.rb +15 -29
  100. data/spec/spec/rails/example/{controller_spec_spec.rb → controller_example_group_spec.rb} +40 -96
  101. data/spec/spec/rails/example/cookies_proxy_spec.rb +32 -36
  102. data/spec/spec/rails/example/error_handling_spec.rb +90 -0
  103. data/spec/spec/rails/example/example_group_factory_spec.rb +5 -5
  104. data/spec/spec/rails/example/{helper_spec_spec.rb → helper_example_group_spec.rb} +45 -13
  105. data/spec/spec/rails/example/{model_spec_spec.rb → model_example_group_spec.rb} +3 -1
  106. data/spec/spec/rails/example/routing_example_group_spec.rb +9 -0
  107. data/spec/spec/rails/example/shared_routing_example_group_examples.rb +45 -0
  108. data/spec/spec/rails/example/test_unit_assertion_accessibility_spec.rb +1 -1
  109. data/spec/spec/rails/example/{view_spec_spec.rb → view_example_group_spec.rb} +44 -17
  110. data/spec/spec/rails/matchers/ar_be_valid_spec.rb +10 -0
  111. data/spec/spec/rails/matchers/assert_select_spec.rb +59 -60
  112. data/spec/spec/rails/matchers/have_text_spec.rb +12 -4
  113. data/spec/spec/rails/matchers/include_text_spec.rb +11 -13
  114. data/spec/spec/rails/matchers/redirect_to_spec.rb +224 -189
  115. data/spec/spec/rails/matchers/render_template_spec.rb +169 -158
  116. data/spec/spec/rails/spec_server_spec.rb +18 -7
  117. data/spec/spec_helper.rb +21 -9
  118. metadata +68 -53
  119. data/lib/spec/rails/example/rails_example_group.rb +0 -28
  120. data/lib/spec/rails/extensions/action_controller/base.rb +0 -14
  121. data/rspec-rails.gemspec +0 -36
  122. data/spec/resources/views/render_spec/some_action.rjs +0 -1
  123. data/spec/spec/rails/example/shared_behaviour_spec.rb +0 -16
  124. data/spec/spec/rails/extensions/action_controller_rescue_action_spec.rb +0 -57
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.12
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - RSpec Development Team
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-01-11 00:00:00 -06:00
12
+ date: 2009-03-15 00:00:00 -05:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -20,7 +20,17 @@ dependencies:
20
20
  requirements:
21
21
  - - "="
22
22
  - !ruby/object:Gem::Version
23
- version: 1.1.12
23
+ version: 1.2.0
24
+ version:
25
+ - !ruby/object:Gem::Dependency
26
+ name: rack
27
+ type: :runtime
28
+ version_requirement:
29
+ version_requirements: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: 0.4.0
24
34
  version:
25
35
  - !ruby/object:Gem::Dependency
26
36
  name: cucumber
@@ -40,7 +50,7 @@ dependencies:
40
50
  requirements:
41
51
  - - ">="
42
52
  - !ruby/object:Gem::Version
43
- version: 1.8.2
53
+ version: 1.10.0
44
54
  version:
45
55
  description: Behaviour Driven Development for Ruby on Rails.
46
56
  email:
@@ -57,12 +67,14 @@ extra_rdoc_files:
57
67
  - TODO.txt
58
68
  - generators/rspec/templates/previous_failures.txt
59
69
  files:
70
+ - .document
60
71
  - History.txt
61
72
  - License.txt
62
73
  - Manifest.txt
63
74
  - README.txt
64
75
  - Rakefile
65
76
  - TODO.txt
77
+ - Upgrade.markdown
66
78
  - features/step_definitions/people.rb
67
79
  - features/support/env.rb
68
80
  - features/transactions/transactions_should_rollback.feature
@@ -104,15 +116,17 @@ files:
104
116
  - lib/spec/rails/example/functional_example_group.rb
105
117
  - lib/spec/rails/example/helper_example_group.rb
106
118
  - lib/spec/rails/example/model_example_group.rb
107
- - lib/spec/rails/example/rails_example_group.rb
108
119
  - lib/spec/rails/example/render_observer.rb
120
+ - lib/spec/rails/example/routing_example_group.rb
121
+ - lib/spec/rails/example/routing_helpers.rb
109
122
  - lib/spec/rails/example/view_example_group.rb
110
123
  - lib/spec/rails/extensions.rb
111
- - lib/spec/rails/extensions/action_controller/base.rb
112
124
  - lib/spec/rails/extensions/action_controller/rescue.rb
125
+ - lib/spec/rails/extensions/action_controller/test_case.rb
113
126
  - lib/spec/rails/extensions/action_controller/test_response.rb
114
127
  - lib/spec/rails/extensions/action_view/base.rb
115
128
  - lib/spec/rails/extensions/active_record/base.rb
129
+ - lib/spec/rails/extensions/active_support/test_case.rb
116
130
  - lib/spec/rails/extensions/spec/matchers/have.rb
117
131
  - lib/spec/rails/extensions/spec/runner/configuration.rb
118
132
  - lib/spec/rails/interop/testcase.rb
@@ -125,14 +139,15 @@ files:
125
139
  - lib/spec/rails/matchers/redirect_to.rb
126
140
  - lib/spec/rails/matchers/render_template.rb
127
141
  - lib/spec/rails/mocks.rb
142
+ - lib/spec/rails/spec_server.rb
128
143
  - lib/spec/rails/story_adapter.rb
129
144
  - lib/spec/rails/version.rb
130
- - rspec-rails.gemspec
131
145
  - spec/autotest/mappings_spec.rb
132
146
  - spec/rails_suite.rb
133
147
  - spec/resources/controllers/action_view_base_spec_controller.rb
134
148
  - spec/resources/controllers/application.rb
135
149
  - spec/resources/controllers/controller_spec_controller.rb
150
+ - spec/resources/controllers/example.txt
136
151
  - spec/resources/controllers/redirect_spec_controller.rb
137
152
  - spec/resources/controllers/render_spec_controller.rb
138
153
  - spec/resources/controllers/rjs_spec_controller.rb
@@ -144,61 +159,61 @@ files:
144
159
  - spec/resources/models/animal.rb
145
160
  - spec/resources/models/person.rb
146
161
  - spec/resources/models/thing.rb
147
- - spec/resources/views/controller_spec/_partial.rhtml
148
- - spec/resources/views/controller_spec/action_setting_flash_after_session_reset.rhtml
149
- - spec/resources/views/controller_spec/action_setting_flash_before_session_reset.rhtml
150
- - spec/resources/views/controller_spec/action_setting_the_assigns_hash.rhtml
151
- - spec/resources/views/controller_spec/action_with_errors_in_template.rhtml
152
- - spec/resources/views/controller_spec/action_with_template.rhtml
153
- - spec/resources/views/layouts/application.rhtml
154
- - spec/resources/views/layouts/simple.rhtml
162
+ - spec/resources/views/controller_spec/_partial.html.erb
163
+ - spec/resources/views/controller_spec/action_setting_flash_after_session_reset.html.erb
164
+ - spec/resources/views/controller_spec/action_setting_flash_before_session_reset.html.erb
165
+ - spec/resources/views/controller_spec/action_setting_the_assigns_hash.html.erb
166
+ - spec/resources/views/controller_spec/action_with_errors_in_template.html.erb
167
+ - spec/resources/views/controller_spec/action_with_template.html.erb
168
+ - spec/resources/views/layouts/application.html.erb
169
+ - spec/resources/views/layouts/simple.html.erb
155
170
  - spec/resources/views/objects/_object.html.erb
156
- - spec/resources/views/render_spec/_a_partial.rhtml
157
- - spec/resources/views/render_spec/action_with_alternate_layout.rhtml
171
+ - spec/resources/views/render_spec/_a_partial.html.erb
172
+ - spec/resources/views/render_spec/action_with_alternate_layout.html.erb
158
173
  - spec/resources/views/render_spec/some_action.html.erb
159
174
  - spec/resources/views/render_spec/some_action.js.rjs
160
- - spec/resources/views/render_spec/some_action.rjs
161
- - spec/resources/views/rjs_spec/_replacement_partial.rhtml
162
- - spec/resources/views/rjs_spec/hide_div.rjs
163
- - spec/resources/views/rjs_spec/hide_page_element.rjs
164
- - spec/resources/views/rjs_spec/insert_html.rjs
165
- - spec/resources/views/rjs_spec/replace.rjs
166
- - spec/resources/views/rjs_spec/replace_html.rjs
167
- - spec/resources/views/rjs_spec/replace_html_with_partial.rjs
168
- - spec/resources/views/rjs_spec/visual_effect.rjs
169
- - spec/resources/views/rjs_spec/visual_toggle_effect.rjs
170
- - spec/resources/views/tag_spec/no_tags.rhtml
171
- - spec/resources/views/tag_spec/single_div_with_no_attributes.rhtml
172
- - spec/resources/views/tag_spec/single_div_with_one_attribute.rhtml
173
- - spec/resources/views/view_spec/_partial.rhtml
174
- - spec/resources/views/view_spec/_partial_used_twice.rhtml
175
- - spec/resources/views/view_spec/_partial_with_local_variable.rhtml
176
- - spec/resources/views/view_spec/_partial_with_sub_partial.rhtml
177
- - spec/resources/views/view_spec/_spacer.rhtml
178
- - spec/resources/views/view_spec/accessor.rhtml
179
- - spec/resources/views/view_spec/block_helper.rhtml
180
- - spec/resources/views/view_spec/entry_form.rhtml
181
- - spec/resources/views/view_spec/explicit_helper.rhtml
182
- - spec/resources/views/view_spec/foo/show.rhtml
183
- - spec/resources/views/view_spec/implicit_helper.rhtml
184
- - spec/resources/views/view_spec/multiple_helpers.rhtml
175
+ - spec/resources/views/rjs_spec/_replacement_partial.html.erb
176
+ - spec/resources/views/rjs_spec/hide_div.js.rjs
177
+ - spec/resources/views/rjs_spec/hide_page_element.js.rjs
178
+ - spec/resources/views/rjs_spec/insert_html.js.rjs
179
+ - spec/resources/views/rjs_spec/replace.js.rjs
180
+ - spec/resources/views/rjs_spec/replace_html.js.rjs
181
+ - spec/resources/views/rjs_spec/replace_html_with_partial.js.rjs
182
+ - spec/resources/views/rjs_spec/visual_effect.js.rjs
183
+ - spec/resources/views/rjs_spec/visual_toggle_effect.js.rjs
184
+ - spec/resources/views/tag_spec/no_tags.html.erb
185
+ - spec/resources/views/tag_spec/single_div_with_no_attributes.html.erb
186
+ - spec/resources/views/tag_spec/single_div_with_one_attribute.html.erb
187
+ - spec/resources/views/view_spec/_partial.html.erb
188
+ - spec/resources/views/view_spec/_partial_used_twice.html.erb
189
+ - spec/resources/views/view_spec/_partial_with_local_variable.html.erb
190
+ - spec/resources/views/view_spec/_partial_with_sub_partial.html.erb
191
+ - spec/resources/views/view_spec/_spacer.html.erb
192
+ - spec/resources/views/view_spec/accessor.html.erb
193
+ - spec/resources/views/view_spec/block_helper.html.erb
194
+ - spec/resources/views/view_spec/entry_form.html.erb
195
+ - spec/resources/views/view_spec/explicit_helper.html.erb
196
+ - spec/resources/views/view_spec/foo/show.html.erb
197
+ - spec/resources/views/view_spec/implicit_helper.html.erb
198
+ - spec/resources/views/view_spec/multiple_helpers.html.erb
185
199
  - spec/resources/views/view_spec/path_params.html.erb
186
- - spec/resources/views/view_spec/should_not_receive.rhtml
187
- - spec/resources/views/view_spec/template_with_partial.rhtml
188
- - spec/resources/views/view_spec/template_with_partial_using_collection.rhtml
189
- - spec/resources/views/view_spec/template_with_partial_with_array.rhtml
200
+ - spec/resources/views/view_spec/should_not_receive.html.erb
201
+ - spec/resources/views/view_spec/template_with_partial.html.erb
202
+ - spec/resources/views/view_spec/template_with_partial_using_collection.html.erb
203
+ - spec/resources/views/view_spec/template_with_partial_with_array.html.erb
190
204
  - spec/spec/rails/example/assigns_hash_proxy_spec.rb
191
205
  - spec/spec/rails/example/configuration_spec.rb
206
+ - spec/spec/rails/example/controller_example_group_spec.rb
192
207
  - spec/spec/rails/example/controller_isolation_spec.rb
193
- - spec/spec/rails/example/controller_spec_spec.rb
194
208
  - spec/spec/rails/example/cookies_proxy_spec.rb
209
+ - spec/spec/rails/example/error_handling_spec.rb
195
210
  - spec/spec/rails/example/example_group_factory_spec.rb
196
- - spec/spec/rails/example/helper_spec_spec.rb
197
- - spec/spec/rails/example/model_spec_spec.rb
198
- - spec/spec/rails/example/shared_behaviour_spec.rb
211
+ - spec/spec/rails/example/helper_example_group_spec.rb
212
+ - spec/spec/rails/example/model_example_group_spec.rb
213
+ - spec/spec/rails/example/routing_example_group_spec.rb
214
+ - spec/spec/rails/example/shared_routing_example_group_examples.rb
199
215
  - spec/spec/rails/example/test_unit_assertion_accessibility_spec.rb
200
- - spec/spec/rails/example/view_spec_spec.rb
201
- - spec/spec/rails/extensions/action_controller_rescue_action_spec.rb
216
+ - spec/spec/rails/example/view_example_group_spec.rb
202
217
  - spec/spec/rails/extensions/action_view_base_spec.rb
203
218
  - spec/spec/rails/extensions/active_record_spec.rb
204
219
  - spec/spec/rails/interop/testcase_spec.rb
@@ -244,6 +259,6 @@ rubyforge_project: rspec
244
259
  rubygems_version: 1.3.1
245
260
  signing_key:
246
261
  specification_version: 2
247
- summary: rspec-rails 1.1.12
262
+ summary: rspec-rails 1.2.0
248
263
  test_files: []
249
264
 
@@ -1,28 +0,0 @@
1
- require 'spec/interop/test'
2
-
3
- if ActionView::Base.respond_to?(:cache_template_extension)
4
- ActionView::Base.cache_template_extensions = false
5
- end
6
-
7
- module Spec
8
- module Rails
9
-
10
- module Example
11
- if ActiveSupport.const_defined?(:TestCase)
12
- class RailsExampleGroup < ActiveSupport::TestCase
13
- include ActionController::Assertions::SelectorAssertions
14
- end
15
- else
16
- class RailsExampleGroup < Test::Unit::TestCase
17
- end
18
- end
19
-
20
- class RailsExampleGroup
21
- include Spec::Rails::Matchers
22
- include Spec::Rails::Mocks
23
- Spec::Example::ExampleGroupFactory.default(self)
24
- end
25
-
26
- end
27
- end
28
- end
@@ -1,14 +0,0 @@
1
- module ActionController
2
- class Base
3
- class << self
4
- def set_view_path(path)
5
- [:append_view_path, :template_root=].each do |method|
6
- if respond_to?(method)
7
- return send(method, path)
8
- end
9
- end
10
- end
11
- end
12
- end
13
- end
14
-
@@ -1,36 +0,0 @@
1
- # -*- encoding: utf-8 -*-
2
-
3
- Gem::Specification.new do |s|
4
- s.name = %q{rspec-rails}
5
- s.version = "1.1.12"
6
-
7
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
- s.authors = ["RSpec Development Team"]
9
- s.date = %q{2009-01-11}
10
- s.description = %q{Behaviour Driven Development for Ruby on Rails.}
11
- s.email = ["rspec-devel@rubyforge.org"]
12
- s.extra_rdoc_files = ["History.txt", "License.txt", "Manifest.txt", "README.txt", "TODO.txt", "generators/rspec/templates/previous_failures.txt"]
13
- s.files = ["History.txt", "License.txt", "Manifest.txt", "README.txt", "Rakefile", "TODO.txt", "features/step_definitions/people.rb", "features/support/env.rb", "features/transactions/transactions_should_rollback.feature", "generators/rspec/CHANGES", "generators/rspec/rspec_generator.rb", "generators/rspec/templates/previous_failures.txt", "generators/rspec/templates/rcov.opts", "generators/rspec/templates/rspec.rake", "generators/rspec/templates/script/autospec", "generators/rspec/templates/script/spec", "generators/rspec/templates/script/spec_server", "generators/rspec/templates/spec.opts", "generators/rspec/templates/spec_helper.rb", "generators/rspec_controller/USAGE", "generators/rspec_controller/rspec_controller_generator.rb", "generators/rspec_controller/templates/controller_spec.rb", "generators/rspec_controller/templates/helper_spec.rb", "generators/rspec_controller/templates/view_spec.rb", "generators/rspec_default_values.rb", "generators/rspec_model/USAGE", "generators/rspec_model/rspec_model_generator.rb", "generators/rspec_model/templates/model_spec.rb", "generators/rspec_scaffold/rspec_scaffold_generator.rb", "generators/rspec_scaffold/templates/controller_spec.rb", "generators/rspec_scaffold/templates/edit_erb_spec.rb", "generators/rspec_scaffold/templates/helper_spec.rb", "generators/rspec_scaffold/templates/index_erb_spec.rb", "generators/rspec_scaffold/templates/new_erb_spec.rb", "generators/rspec_scaffold/templates/routing_spec.rb", "generators/rspec_scaffold/templates/show_erb_spec.rb", "init.rb", "lib/autotest/discover.rb", "lib/autotest/rails_rspec.rb", "lib/spec/rails.rb", "lib/spec/rails/example.rb", "lib/spec/rails/example/assigns_hash_proxy.rb", "lib/spec/rails/example/controller_example_group.rb", "lib/spec/rails/example/cookies_proxy.rb", "lib/spec/rails/example/functional_example_group.rb", "lib/spec/rails/example/helper_example_group.rb", "lib/spec/rails/example/model_example_group.rb", "lib/spec/rails/example/rails_example_group.rb", "lib/spec/rails/example/render_observer.rb", "lib/spec/rails/example/view_example_group.rb", "lib/spec/rails/extensions.rb", "lib/spec/rails/extensions/action_controller/base.rb", "lib/spec/rails/extensions/action_controller/rescue.rb", "lib/spec/rails/extensions/action_controller/test_response.rb", "lib/spec/rails/extensions/action_view/base.rb", "lib/spec/rails/extensions/active_record/base.rb", "lib/spec/rails/extensions/spec/matchers/have.rb", "lib/spec/rails/extensions/spec/runner/configuration.rb", "lib/spec/rails/interop/testcase.rb", "lib/spec/rails/matchers.rb", "lib/spec/rails/matchers/ar_be_valid.rb", "lib/spec/rails/matchers/assert_select.rb", "lib/spec/rails/matchers/change.rb", "lib/spec/rails/matchers/have_text.rb", "lib/spec/rails/matchers/include_text.rb", "lib/spec/rails/matchers/redirect_to.rb", "lib/spec/rails/matchers/render_template.rb", "lib/spec/rails/mocks.rb", "lib/spec/rails/story_adapter.rb", "lib/spec/rails/version.rb", "rspec-rails.gemspec", "spec/autotest/mappings_spec.rb", "spec/rails_suite.rb", "spec/resources/controllers/action_view_base_spec_controller.rb", "spec/resources/controllers/application.rb", "spec/resources/controllers/controller_spec_controller.rb", "spec/resources/controllers/redirect_spec_controller.rb", "spec/resources/controllers/render_spec_controller.rb", "spec/resources/controllers/rjs_spec_controller.rb", "spec/resources/helpers/addition_helper.rb", "spec/resources/helpers/explicit_helper.rb", "spec/resources/helpers/more_explicit_helper.rb", "spec/resources/helpers/plugin_application_helper.rb", "spec/resources/helpers/view_spec_helper.rb", "spec/resources/models/animal.rb", "spec/resources/models/person.rb", "spec/resources/models/thing.rb", "spec/resources/views/controller_spec/_partial.rhtml", "spec/resources/views/controller_spec/action_setting_flash_after_session_reset.rhtml", "spec/resources/views/controller_spec/action_setting_flash_before_session_reset.rhtml", "spec/resources/views/controller_spec/action_setting_the_assigns_hash.rhtml", "spec/resources/views/controller_spec/action_with_errors_in_template.rhtml", "spec/resources/views/controller_spec/action_with_template.rhtml", "spec/resources/views/layouts/application.rhtml", "spec/resources/views/layouts/simple.rhtml", "spec/resources/views/objects/_object.html.erb", "spec/resources/views/render_spec/_a_partial.rhtml", "spec/resources/views/render_spec/action_with_alternate_layout.rhtml", "spec/resources/views/render_spec/some_action.html.erb", "spec/resources/views/render_spec/some_action.js.rjs", "spec/resources/views/render_spec/some_action.rjs", "spec/resources/views/rjs_spec/_replacement_partial.rhtml", "spec/resources/views/rjs_spec/hide_div.rjs", "spec/resources/views/rjs_spec/hide_page_element.rjs", "spec/resources/views/rjs_spec/insert_html.rjs", "spec/resources/views/rjs_spec/replace.rjs", "spec/resources/views/rjs_spec/replace_html.rjs", "spec/resources/views/rjs_spec/replace_html_with_partial.rjs", "spec/resources/views/rjs_spec/visual_effect.rjs", "spec/resources/views/rjs_spec/visual_toggle_effect.rjs", "spec/resources/views/tag_spec/no_tags.rhtml", "spec/resources/views/tag_spec/single_div_with_no_attributes.rhtml", "spec/resources/views/tag_spec/single_div_with_one_attribute.rhtml", "spec/resources/views/view_spec/_partial.rhtml", "spec/resources/views/view_spec/_partial_used_twice.rhtml", "spec/resources/views/view_spec/_partial_with_local_variable.rhtml", "spec/resources/views/view_spec/_partial_with_sub_partial.rhtml", "spec/resources/views/view_spec/_spacer.rhtml", "spec/resources/views/view_spec/accessor.rhtml", "spec/resources/views/view_spec/block_helper.rhtml", "spec/resources/views/view_spec/entry_form.rhtml", "spec/resources/views/view_spec/explicit_helper.rhtml", "spec/resources/views/view_spec/foo/show.rhtml", "spec/resources/views/view_spec/implicit_helper.rhtml", "spec/resources/views/view_spec/multiple_helpers.rhtml", "spec/resources/views/view_spec/path_params.html.erb", "spec/resources/views/view_spec/should_not_receive.rhtml", "spec/resources/views/view_spec/template_with_partial.rhtml", "spec/resources/views/view_spec/template_with_partial_using_collection.rhtml", "spec/resources/views/view_spec/template_with_partial_with_array.rhtml", "spec/spec/rails/example/assigns_hash_proxy_spec.rb", "spec/spec/rails/example/configuration_spec.rb", "spec/spec/rails/example/controller_isolation_spec.rb", "spec/spec/rails/example/controller_spec_spec.rb", "spec/spec/rails/example/cookies_proxy_spec.rb", "spec/spec/rails/example/example_group_factory_spec.rb", "spec/spec/rails/example/helper_spec_spec.rb", "spec/spec/rails/example/model_spec_spec.rb", "spec/spec/rails/example/shared_behaviour_spec.rb", "spec/spec/rails/example/test_unit_assertion_accessibility_spec.rb", "spec/spec/rails/example/view_spec_spec.rb", "spec/spec/rails/extensions/action_controller_rescue_action_spec.rb", "spec/spec/rails/extensions/action_view_base_spec.rb", "spec/spec/rails/extensions/active_record_spec.rb", "spec/spec/rails/interop/testcase_spec.rb", "spec/spec/rails/matchers/ar_be_valid_spec.rb", "spec/spec/rails/matchers/assert_select_spec.rb", "spec/spec/rails/matchers/errors_on_spec.rb", "spec/spec/rails/matchers/have_text_spec.rb", "spec/spec/rails/matchers/include_text_spec.rb", "spec/spec/rails/matchers/redirect_to_spec.rb", "spec/spec/rails/matchers/render_template_spec.rb", "spec/spec/rails/matchers/should_change_spec.rb", "spec/spec/rails/mocks/ar_classes.rb", "spec/spec/rails/mocks/mock_model_spec.rb", "spec/spec/rails/mocks/stub_model_spec.rb", "spec/spec/rails/sample_modified_fixture.rb", "spec/spec/rails/sample_spec.rb", "spec/spec/rails/spec_server_spec.rb", "spec/spec/rails/spec_spec.rb", "spec/spec_helper.rb"]
14
- s.has_rdoc = true
15
- s.homepage = %q{http://rspec.info/}
16
- s.rdoc_options = ["--main", "README.txt"]
17
- s.require_paths = ["lib"]
18
- s.rubyforge_project = %q{rspec}
19
- s.rubygems_version = %q{1.3.1}
20
- s.summary = %q{rspec-rails 1.1.12}
21
-
22
- if s.respond_to? :specification_version then
23
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
24
- s.specification_version = 2
25
-
26
- if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
27
- s.add_runtime_dependency(%q<rspec>, ["= 1.1.12"])
28
- s.add_development_dependency(%q<cucumber>, [">= 0.1.13"])
29
- s.add_development_dependency(%q<hoe>, [">= 1.8.2"])
30
- else
31
- s.add_dependency(%q<rspec>, ["= 1.1.12"])
32
- end
33
- else
34
- s.add_dependency(%q<rspec>, ["= 1.1.12"])
35
- end
36
- end
@@ -1 +0,0 @@
1
- # This is used for rails <= 1.2.3
@@ -1,16 +0,0 @@
1
- require File.dirname(__FILE__) + '/../../../spec_helper'
2
-
3
- describe "A shared view example_group", :shared => true do
4
- it "should have some tag with some text" do
5
- response.should have_tag('div', 'This is text from a method in the ViewSpecHelper')
6
- end
7
- end
8
-
9
- describe "A view example_group", :type => :view do
10
- it_should_behave_like "A shared view example_group"
11
-
12
- before(:each) do
13
- render "view_spec/implicit_helper"
14
- end
15
- end
16
-
@@ -1,57 +0,0 @@
1
- require File.dirname(__FILE__) + '/../../../spec_helper'
2
-
3
- module ActionController
4
- describe "Rescue", "#rescue_action in default mode" do
5
- before(:each) do
6
- @fixture = Object.new
7
- @fixture.extend ActionController::Rescue
8
- def @fixture.rescue_with_handler(exception)
9
- false
10
- end
11
- class << @fixture
12
- public :rescue_action
13
- end
14
- end
15
-
16
- it "should raise the passed in exception so examples fail fast" do
17
- proc {@fixture.rescue_action(RuntimeError.new("Foobar"))}.should raise_error(RuntimeError, "Foobar")
18
- end
19
- end
20
-
21
- class RescueOverriddenController < ActionController::Base
22
- def rescue_action(error)
23
- "successfully overridden"
24
- end
25
- end
26
-
27
- describe "Rescue", "#rescue_action, when overridden" do
28
- before(:each) do
29
- @fixture = RescueOverriddenController.new
30
- end
31
-
32
- it "should do whatever the overridden method does" do
33
- @fixture.rescue_action(RuntimeError.new("Foobar")).should == "successfully overridden"
34
- end
35
- end
36
-
37
- class SearchController < ActionController::Base
38
- end
39
-
40
- describe "Rescue", "#rescue_action when told to use rails error handling" do
41
- before(:each) do
42
- @controller = SearchController.new
43
- @controller.use_rails_error_handling!
44
- class << @controller
45
- public :rescue_action
46
- end
47
- end
48
-
49
- it "should use Rails exception handling" do
50
- exception = RuntimeError.new("The Error")
51
- exception.stub!(:backtrace).and_return(caller)
52
- @controller.should_receive(:rescue_action_locally).with(exception)
53
-
54
- @controller.rescue_action(exception)
55
- end
56
- end
57
- end