dchelimsky-rspec-rails 1.1.11.4 → 1.1.11.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/History.txt +7 -1
- data/Manifest.txt +2 -2
- data/Rakefile +1 -5
- data/TODO.txt +1 -0
- data/generators/rspec/templates/script/spec_server +17 -8
- data/lib/spec/rails/example/cookies_proxy.rb +5 -1
- data/lib/spec/rails/example/functional_example_group.rb +13 -1
- data/lib/spec/rails/extensions/action_controller/base.rb +1 -1
- data/lib/spec/rails/extensions/action_controller/test_response.rb +11 -2
- data/lib/spec/rails/extensions/active_record/base.rb +1 -2
- data/lib/spec/rails/matchers/redirect_to.rb +3 -1
- data/lib/spec/rails/mocks.rb +11 -8
- data/lib/spec/rails/version.rb +1 -1
- data/rspec-rails.gemspec +8 -8
- data/spec/resources/controllers/controller_spec_controller.rb +2 -6
- data/spec/spec/rails/example/controller_isolation_spec.rb +0 -2
- data/spec/spec/rails/example/controller_spec_spec.rb +10 -2
- data/spec/spec/rails/example/cookies_proxy_spec.rb +29 -12
- data/spec/spec/rails/matchers/redirect_to_spec.rb +4 -0
- data/spec/spec/rails/matchers/render_template_spec.rb +7 -3
- data/spec/spec/rails/spec_server_spec.rb +96 -96
- metadata +7 -6
- data/spec/spec/rails/matchers/description_generation_spec.rb +0 -37
- /data/spec/resources/views/render_spec/{some_action.rhtml → some_action.html.erb} +0 -0
data/History.txt
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
=== Maintenance
|
2
2
|
|
3
|
+
* 2 deprecations
|
4
|
+
|
5
|
+
* TestResponse#[] is deprecated if you're using Rails <= 2.2.x and removed if you're using Rails 2.3
|
6
|
+
* add_stubs(model, {:method => value}) is deprecated. Use model.stub!(:method => value) instead.
|
7
|
+
|
3
8
|
* 2 major enhancements
|
4
9
|
|
5
10
|
* support controller and action path params in view specs (Mike Vincent).
|
@@ -11,12 +16,13 @@
|
|
11
16
|
* use more liberal globs to allow for specs in symlinked dirs (Martin Luder). Closes #361.
|
12
17
|
* Enable loading fixtures from arbitrary locations (Jacek Becela). Closes #464.
|
13
18
|
|
14
|
-
*
|
19
|
+
* 5 bug fixes
|
15
20
|
|
16
21
|
* Attempt to load application_controller before falling back to application (Geoff Garside). Closes #626.
|
17
22
|
* Include _id and reduce quoting of default values in view specs (Steen Lehmann). Closes #598.
|
18
23
|
* Record calls to render and check rendered[:template] and rendered[:partial] for edge rails (> v2.2.2). Closes #633.
|
19
24
|
* config.gem 'rspec' can't be unpacked. Closes #629.
|
25
|
+
* spec_server not working with Rails 2.2.2 (Andreas Wolff). Closes #631.
|
20
26
|
|
21
27
|
=== Version 1.1.11 / 2008-10-24
|
22
28
|
|
data/Manifest.txt
CHANGED
@@ -3,6 +3,7 @@ License.txt
|
|
3
3
|
Manifest.txt
|
4
4
|
README.txt
|
5
5
|
Rakefile
|
6
|
+
TODO.txt
|
6
7
|
features/step_definitions/people.rb
|
7
8
|
features/support/env.rb
|
8
9
|
features/transactions/transactions_should_rollback.feature
|
@@ -95,8 +96,8 @@ spec/resources/views/layouts/simple.rhtml
|
|
95
96
|
spec/resources/views/objects/_object.html.erb
|
96
97
|
spec/resources/views/render_spec/_a_partial.rhtml
|
97
98
|
spec/resources/views/render_spec/action_with_alternate_layout.rhtml
|
99
|
+
spec/resources/views/render_spec/some_action.html.erb
|
98
100
|
spec/resources/views/render_spec/some_action.js.rjs
|
99
|
-
spec/resources/views/render_spec/some_action.rhtml
|
100
101
|
spec/resources/views/render_spec/some_action.rjs
|
101
102
|
spec/resources/views/rjs_spec/_replacement_partial.rhtml
|
102
103
|
spec/resources/views/rjs_spec/hide_div.rjs
|
@@ -144,7 +145,6 @@ spec/spec/rails/extensions/active_record_spec.rb
|
|
144
145
|
spec/spec/rails/interop/testcase_spec.rb
|
145
146
|
spec/spec/rails/matchers/ar_be_valid_spec.rb
|
146
147
|
spec/spec/rails/matchers/assert_select_spec.rb
|
147
|
-
spec/spec/rails/matchers/description_generation_spec.rb
|
148
148
|
spec/spec/rails/matchers/errors_on_spec.rb
|
149
149
|
spec/spec/rails/matchers/have_text_spec.rb
|
150
150
|
spec/spec/rails/matchers/include_text_spec.rb
|
data/Rakefile
CHANGED
@@ -20,7 +20,7 @@ Hoe.new('rspec-rails', Spec::Rails::VERSION::STRING) do |p|
|
|
20
20
|
p.description = "Behaviour Driven Development for Ruby on Rails."
|
21
21
|
p.rubyforge_name = 'rspec'
|
22
22
|
p.developer('RSpec Development Team', 'rspec-devel@rubyforge.org')
|
23
|
-
p.extra_deps = [["rspec","1.1.11.
|
23
|
+
p.extra_deps = [["rspec","1.1.11.5"]]
|
24
24
|
p.extra_dev_deps = [["cucumber",">= 0.1.13"]]
|
25
25
|
p.remote_rdoc_dir = "rspec-rails/#{Spec::Rails::VERSION::STRING}"
|
26
26
|
end
|
@@ -44,10 +44,6 @@ task :release => [:clean, :package] do |t|
|
|
44
44
|
end
|
45
45
|
end
|
46
46
|
|
47
|
-
task :spec do
|
48
|
-
system "spec spec"
|
49
|
-
end
|
50
|
-
|
51
47
|
Spec::Rake::SpecTask.new
|
52
48
|
|
53
49
|
Cucumber::Rake::Task.new
|
data/TODO.txt
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
As of Rails a14bbd7a8574c3b485d4b71e0950b2b9ff4e90d7, cookies are managed differently.
|
@@ -13,17 +13,21 @@ module Spec
|
|
13
13
|
def run(argv, stderr, stdout)
|
14
14
|
$stdout = stdout
|
15
15
|
$stderr = stderr
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
conn.
|
22
|
-
|
16
|
+
|
17
|
+
unless ActiveRecord::Base.respond_to?(:clear_reloadable_connections!)
|
18
|
+
base = ActiveRecord::Base
|
19
|
+
def base.clear_reloadable_connections!
|
20
|
+
active_connections.each do |name, conn|
|
21
|
+
if conn.requires_reloading?
|
22
|
+
conn.disconnect!
|
23
|
+
active_connections.delete(name)
|
24
|
+
end
|
23
25
|
end
|
24
26
|
end
|
25
27
|
end
|
26
28
|
|
29
|
+
ActiveRecord::Base.clear_reloadable_connections!
|
30
|
+
|
27
31
|
if ActionController.const_defined?(:Dispatcher)
|
28
32
|
dispatcher = ::ActionController::Dispatcher.new($stdout)
|
29
33
|
dispatcher.cleanup_application
|
@@ -35,8 +39,13 @@ module Spec
|
|
35
39
|
if Object.const_defined?(:Fixtures) && Fixtures.respond_to?(:reset_cache)
|
36
40
|
Fixtures.reset_cache
|
37
41
|
end
|
42
|
+
|
43
|
+
if ::ActiveSupport.const_defined?(:Dependencies)
|
44
|
+
::ActiveSupport::Dependencies.mechanism = :load
|
45
|
+
else
|
46
|
+
::Dependencies.mechanism = :load
|
47
|
+
end
|
38
48
|
|
39
|
-
::Dependencies.mechanism = :load
|
40
49
|
require_dependency('application.rb') unless Object.const_defined?(:ApplicationController)
|
41
50
|
load File.dirname(__FILE__) + '/../spec/spec_helper.rb'
|
42
51
|
|
@@ -9,7 +9,11 @@ module Spec
|
|
9
9
|
end
|
10
10
|
|
11
11
|
def[]=(name, value)
|
12
|
-
|
12
|
+
if ::Rails::VERSION::STRING >= '2.3'
|
13
|
+
@example.request.cookies[name.to_s] = value
|
14
|
+
else
|
15
|
+
@example.request.cookies[name.to_s] = CGI::Cookie.new(name.to_s, value)
|
16
|
+
end
|
13
17
|
end
|
14
18
|
|
15
19
|
def [](name)
|
@@ -44,11 +44,23 @@ module Spec
|
|
44
44
|
# post :login
|
45
45
|
# cookies[:login].expires.should == 1.week.from_now
|
46
46
|
#
|
47
|
-
# == Examples (Rails
|
47
|
+
# == Examples (Rails 2.0 > 2.2)
|
48
48
|
#
|
49
49
|
# cookies[:user_id] = {:value => '1234', :expires => 1.minute.ago}
|
50
50
|
# get :index
|
51
51
|
# response.should be_redirect
|
52
|
+
#
|
53
|
+
# == Examples (Rails 2.3)
|
54
|
+
#
|
55
|
+
# Rails 2.3 changes the way cookies are made available to functional
|
56
|
+
# tests (and therefore rspec controller specs), only making single
|
57
|
+
# values available with no access to other aspects of the cookie. This
|
58
|
+
# is backwards-incompatible, so you have to change your examples to
|
59
|
+
# look like this:
|
60
|
+
#
|
61
|
+
# cookies[:foo] = 'bar'
|
62
|
+
# get :index
|
63
|
+
# cookies[:foo].should == 'bar'
|
52
64
|
def cookies
|
53
65
|
@cookies ||= Spec::Rails::Example::CookiesProxy.new(self)
|
54
66
|
end
|
@@ -5,7 +5,16 @@ module ActionController #:nodoc:
|
|
5
5
|
def capture(name)
|
6
6
|
template.instance_variable_get "@content_for_#{name.to_s}"
|
7
7
|
end
|
8
|
-
|
9
|
-
|
8
|
+
|
9
|
+
if ::Rails::VERSION::STRING < "2.3"
|
10
|
+
def [](name)
|
11
|
+
Kernel.warn <<-WARNING
|
12
|
+
[](name) as an alias for capture(name) (TestResponse extension in rspec-rails)
|
13
|
+
is deprecated and will be removed in the rspec-rails release that follows the
|
14
|
+
rails-2.3.0 release.
|
15
|
+
WARNING
|
16
|
+
capture(name)
|
17
|
+
end
|
18
|
+
end
|
10
19
|
end
|
11
20
|
end
|
@@ -74,13 +74,15 @@ module Spec
|
|
74
74
|
end
|
75
75
|
|
76
76
|
def description
|
77
|
-
"redirect to #{@
|
77
|
+
"redirect to #{@expected.inspect}"
|
78
78
|
end
|
79
79
|
|
80
80
|
class QueryParameterParser
|
81
81
|
def self.parse_query_parameters(query, request)
|
82
82
|
if defined?(CGIMethods)
|
83
83
|
CGIMethods.parse_query_parameters(query)
|
84
|
+
elsif defined?(ActionController::RequestParser)
|
85
|
+
ActionController::RequestParser.parse_query_parameters(query)
|
84
86
|
else
|
85
87
|
request.class.parse_query_parameters(query)
|
86
88
|
end
|
data/lib/spec/rails/mocks.rb
CHANGED
@@ -104,21 +104,24 @@ module Spec
|
|
104
104
|
model[k] = stubs.delete(k)
|
105
105
|
end
|
106
106
|
end
|
107
|
-
|
107
|
+
model.stub!(stubs)
|
108
108
|
yield model if block_given?
|
109
109
|
end
|
110
110
|
end
|
111
111
|
|
112
|
-
|
113
|
-
#
|
114
|
-
# - object.stub!(:method => return_value, :method2 => return_value2, :etc => etc)
|
115
|
-
#++
|
112
|
+
# DEPRECATED - use object.stub!(:method => value, :method2 => value)
|
113
|
+
#
|
116
114
|
# Stubs methods on +object+ (if +object+ is a symbol or string a new mock
|
117
115
|
# with that name will be created). +stubs+ is a Hash of +method=>value+
|
118
116
|
def add_stubs(object, stubs = {}) #:nodoc:
|
119
|
-
|
120
|
-
|
121
|
-
|
117
|
+
Kernel.warn <<-WARNING
|
118
|
+
DEPRECATION NOTICE: add_stubs is deprecated and will be removed
|
119
|
+
from a future version of rspec-rails. Use this instead:
|
120
|
+
|
121
|
+
object.stub!(:method => value, :method2 => value)
|
122
|
+
|
123
|
+
WARNING
|
124
|
+
object.stub!(stubs)
|
122
125
|
end
|
123
126
|
|
124
127
|
private
|
data/lib/spec/rails/version.rb
CHANGED
data/rspec-rails.gemspec
CHANGED
@@ -2,35 +2,35 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{rspec-rails}
|
5
|
-
s.version = "1.1.11.
|
5
|
+
s.version = "1.1.11.5"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["RSpec Development Team"]
|
9
|
-
s.date = %q{
|
9
|
+
s.date = %q{2009-01-04}
|
10
10
|
s.description = %q{Behaviour Driven Development for Ruby on Rails.}
|
11
11
|
s.email = ["rspec-devel@rubyforge.org"]
|
12
|
-
s.extra_rdoc_files = ["History.txt", "License.txt", "Manifest.txt", "README.txt", "generators/rspec/templates/previous_failures.txt"]
|
13
|
-
s.files = ["History.txt", "License.txt", "Manifest.txt", "README.txt", "Rakefile", "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.
|
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
14
|
s.has_rdoc = true
|
15
15
|
s.homepage = %q{http://rspec.info/}
|
16
16
|
s.rdoc_options = ["--main", "README.txt"]
|
17
17
|
s.require_paths = ["lib"]
|
18
18
|
s.rubyforge_project = %q{rspec}
|
19
19
|
s.rubygems_version = %q{1.3.1}
|
20
|
-
s.summary = %q{rspec-rails 1.1.11.
|
20
|
+
s.summary = %q{rspec-rails 1.1.11.5}
|
21
21
|
|
22
22
|
if s.respond_to? :specification_version then
|
23
23
|
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
24
24
|
s.specification_version = 2
|
25
25
|
|
26
26
|
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
27
|
-
s.add_runtime_dependency(%q<rspec>, ["= 1.1.11.
|
27
|
+
s.add_runtime_dependency(%q<rspec>, ["= 1.1.11.5"])
|
28
28
|
s.add_development_dependency(%q<cucumber>, [">= 0.1.13"])
|
29
29
|
s.add_development_dependency(%q<hoe>, [">= 1.8.2"])
|
30
30
|
else
|
31
|
-
s.add_dependency(%q<rspec>, ["= 1.1.11.
|
31
|
+
s.add_dependency(%q<rspec>, ["= 1.1.11.5"])
|
32
32
|
end
|
33
33
|
else
|
34
|
-
s.add_dependency(%q<rspec>, ["= 1.1.11.
|
34
|
+
s.add_dependency(%q<rspec>, ["= 1.1.11.5"])
|
35
35
|
end
|
36
36
|
end
|
@@ -6,12 +6,8 @@ class ControllerSpecController < ActionController::Base
|
|
6
6
|
end
|
7
7
|
|
8
8
|
skip_before_filter :raise_error
|
9
|
-
|
10
|
-
|
11
|
-
set_view_path [File.join(File.dirname(__FILE__), "..", "views")]
|
12
|
-
else
|
13
|
-
set_view_path File.join(File.dirname(__FILE__), "..", "views")
|
14
|
-
end
|
9
|
+
|
10
|
+
set_view_path File.join(File.dirname(__FILE__), "..", "views")
|
15
11
|
|
16
12
|
def some_action
|
17
13
|
render :template => "template/that/does/not/actually/exist"
|
@@ -34,12 +34,10 @@ describe "a controller spec running in integration mode", :type => :controller d
|
|
34
34
|
it "should choke if the template doesn't exist" do
|
35
35
|
error = defined?(ActionController::MissingTemplate) ? ActionController::MissingTemplate : ActionView::MissingTemplate
|
36
36
|
lambda { get 'some_action' }.should raise_error(error)
|
37
|
-
response.should_not be_success
|
38
37
|
end
|
39
38
|
|
40
39
|
it "should choke if the template has errors" do
|
41
40
|
lambda { get 'action_with_errors_in_template' }.should raise_error(ActionView::TemplateError)
|
42
|
-
response.should_not be_success
|
43
41
|
end
|
44
42
|
|
45
43
|
describe "nested" do
|
@@ -144,12 +144,20 @@ require 'controller_spec_controller'
|
|
144
144
|
|
145
145
|
it "should support a Symbol key" do
|
146
146
|
get 'action_which_sets_cookie', :value => "cookie value"
|
147
|
-
|
147
|
+
if Rails::VERSION::STRING >= "2.3"
|
148
|
+
cookies[:cookie_key].should == "cookie+value"
|
149
|
+
else
|
150
|
+
cookies[:cookie_key].should == ["cookie value"]
|
151
|
+
end
|
148
152
|
end
|
149
153
|
|
150
154
|
it "should support a String key" do
|
151
155
|
get 'action_which_sets_cookie', :value => "cookie value"
|
152
|
-
|
156
|
+
if Rails::VERSION::STRING >= "2.3"
|
157
|
+
cookies['cookie_key'].should == "cookie+value"
|
158
|
+
else
|
159
|
+
cookies['cookie_key'].should == ["cookie value"]
|
160
|
+
end
|
153
161
|
end
|
154
162
|
|
155
163
|
end
|
@@ -3,6 +3,7 @@ require File.dirname(__FILE__) + '/../../../spec_helper'
|
|
3
3
|
class CookiesProxyExamplesController < ActionController::Base
|
4
4
|
def index
|
5
5
|
cookies[:key] = cookies[:key]
|
6
|
+
render :text => ""
|
6
7
|
end
|
7
8
|
end
|
8
9
|
|
@@ -18,18 +19,26 @@ module Spec
|
|
18
19
|
cookies = CookiesProxy.new(self)
|
19
20
|
cookies['key'] = 'value'
|
20
21
|
get :index
|
21
|
-
|
22
|
+
if ::Rails::VERSION::STRING >= "2.3"
|
23
|
+
cookies['key'].should == 'value'
|
24
|
+
else
|
25
|
+
cookies['key'].should == ['value']
|
26
|
+
end
|
22
27
|
end
|
23
28
|
|
24
|
-
if Rails::VERSION::STRING >= "2.0.0"
|
29
|
+
if ::Rails::VERSION::STRING >= "2.0.0"
|
25
30
|
it "should accept a Hash value" do
|
26
31
|
cookies = CookiesProxy.new(self)
|
27
32
|
cookies['key'] = { :value => 'value', :expires => expiration = 1.hour.from_now, :path => path = '/path' }
|
28
33
|
get :index
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
34
|
+
if ::Rails::VERSION::STRING >= "2.3"
|
35
|
+
cookies['key'].should == 'value'
|
36
|
+
else
|
37
|
+
cookies['key'].should == ['value']
|
38
|
+
cookies['key'].value.should == ['value']
|
39
|
+
cookies['key'].expires.should == expiration
|
40
|
+
cookies['key'].path.should == path
|
41
|
+
end
|
33
42
|
end
|
34
43
|
end
|
35
44
|
|
@@ -41,18 +50,26 @@ module Spec
|
|
41
50
|
example_cookies = CookiesProxy.new(self)
|
42
51
|
example_cookies[:key] = 'value'
|
43
52
|
get :index
|
44
|
-
|
53
|
+
if ::Rails::VERSION::STRING >= "2.3"
|
54
|
+
example_cookies[:key].should == 'value'
|
55
|
+
else
|
56
|
+
example_cookies[:key].should == ['value']
|
57
|
+
end
|
45
58
|
end
|
46
59
|
|
47
|
-
if Rails::VERSION::STRING >= "2.0.0"
|
60
|
+
if ::Rails::VERSION::STRING >= "2.0.0"
|
48
61
|
it "should accept a Hash value" do
|
49
62
|
example_cookies = CookiesProxy.new(self)
|
50
63
|
example_cookies[:key] = { :value => 'value', :expires => expiration = 1.hour.from_now, :path => path = '/path' }
|
51
64
|
get :index
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
65
|
+
if ::Rails::VERSION::STRING >= "2.3"
|
66
|
+
example_cookies[:key].should == 'value'
|
67
|
+
else
|
68
|
+
example_cookies[:key].should == ['value']
|
69
|
+
example_cookies[:key].value.should == ['value']
|
70
|
+
example_cookies[:key].expires.should == expiration
|
71
|
+
example_cookies[:key].path.should == path
|
72
|
+
end
|
56
73
|
end
|
57
74
|
end
|
58
75
|
|
@@ -204,6 +204,10 @@ require File.dirname(__FILE__) + '/../../../spec_helper'
|
|
204
204
|
response.should redirect_to(route)
|
205
205
|
}.should raise_error(ActionController::RoutingError, /(no route found to match|No route matches) \"\/nonexistant\/none\" with \{\}/)
|
206
206
|
end
|
207
|
+
|
208
|
+
it "provides a description" do
|
209
|
+
redirect_to("foo/bar").description.should == %q|redirect to "foo/bar"|
|
210
|
+
end
|
207
211
|
|
208
212
|
end
|
209
213
|
end
|
@@ -51,14 +51,14 @@ require File.dirname(__FILE__) + '/../../../spec_helper'
|
|
51
51
|
post 'some_action'
|
52
52
|
lambda do
|
53
53
|
response.should render_template('non_existent_template')
|
54
|
-
end.should fail_with(/expected \"non_existent_template\", got \"render_spec\/some_action(
|
54
|
+
end.should fail_with(/expected \"non_existent_template\", got \"render_spec\/some_action(\.html\.erb)?\"/)
|
55
55
|
end
|
56
56
|
|
57
57
|
it "should fail without full path when template is associated with a different controller" do
|
58
58
|
post 'action_which_renders_template_from_other_controller'
|
59
59
|
lambda do
|
60
60
|
response.should render_template('action_with_template')
|
61
|
-
end.should fail_with(/expected \"action_with_template\", got \"controller_spec\/action_with_template(
|
61
|
+
end.should fail_with(/expected \"action_with_template\", got \"controller_spec\/action_with_template(\.rhtml)?\"/)
|
62
62
|
end
|
63
63
|
|
64
64
|
it "should fail with incorrect full path when template is associated with a different controller" do
|
@@ -72,7 +72,7 @@ require File.dirname(__FILE__) + '/../../../spec_helper'
|
|
72
72
|
get 'some_action'
|
73
73
|
lambda {
|
74
74
|
response.should render_template('render_spec/some_action.rjs')
|
75
|
-
}.should fail_with(/expected \"render_spec\/some_action\.rjs\", got \"render_spec\/some_action(\.
|
75
|
+
}.should fail_with(/expected \"render_spec\/some_action\.rjs\", got \"render_spec\/some_action(\.html\.erb)?\"/)
|
76
76
|
end
|
77
77
|
|
78
78
|
it "should fail when TEXT is rendered" do
|
@@ -88,6 +88,10 @@ require File.dirname(__FILE__) + '/../../../spec_helper'
|
|
88
88
|
response.should render_template('action_with_alternate_layout')
|
89
89
|
end
|
90
90
|
end
|
91
|
+
|
92
|
+
it "provides a description" do
|
93
|
+
render_template("foo/bar").description.should == %q|render template "foo/bar"|
|
94
|
+
end
|
91
95
|
end
|
92
96
|
|
93
97
|
describe "response.should_not render_template (in #{mode} mode)",
|
@@ -1,96 +1,96 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
1
|
+
require File.dirname(__FILE__) + '/../../spec_helper'
|
2
|
+
|
3
|
+
describe "script/spec_server file", :shared => true do
|
4
|
+
attr_accessor :tmbundle_install_directory
|
5
|
+
attr_reader :animals_yml_path, :original_animals_content
|
6
|
+
|
7
|
+
before do
|
8
|
+
@animals_yml_path = File.expand_path("#{RAILS_ROOT}/spec/fixtures/animals.yml")
|
9
|
+
@original_animals_content = File.read(animals_yml_path)
|
10
|
+
end
|
11
|
+
|
12
|
+
after do
|
13
|
+
File.open(animals_yml_path, "w") do |f|
|
14
|
+
f.write original_animals_content
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
after(:each) do
|
19
|
+
system "lsof -i tcp:8989 | sed /COMMAND/d | awk '{print $2}' | xargs kill"
|
20
|
+
end
|
21
|
+
|
22
|
+
it "runs a spec" do
|
23
|
+
dir = File.expand_path(File.dirname(__FILE__))
|
24
|
+
output = ""
|
25
|
+
Timeout.timeout(10) do
|
26
|
+
loop do
|
27
|
+
output = `#{RAILS_ROOT}/script/spec #{dir}/sample_spec.rb --drb 2>&1`
|
28
|
+
break unless output.include?("No server is running")
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
if $?.exitstatus != 0 || output !~ /0 failures/
|
33
|
+
flunk "command 'script/spec spec/sample_spec' failed\n#{output}"
|
34
|
+
end
|
35
|
+
|
36
|
+
fixtures = YAML.load(@original_animals_content)
|
37
|
+
fixtures['pig']['name'] = "Piggy"
|
38
|
+
|
39
|
+
File.open(animals_yml_path, "w") do |f|
|
40
|
+
f.write YAML.dump(fixtures)
|
41
|
+
end
|
42
|
+
|
43
|
+
Timeout.timeout(10) do
|
44
|
+
loop do
|
45
|
+
output = `#{RAILS_ROOT}/script/spec #{dir}/sample_modified_fixture.rb --drb 2>&1`
|
46
|
+
break unless output.include?("No server is running")
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
if $?.exitstatus != 0 || output !~ /0 failures/
|
51
|
+
flunk "command 'script/spec spec/sample_modified_fixture' failed\n#{output}"
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
def start_spec_server
|
56
|
+
dir = File.dirname(__FILE__)
|
57
|
+
Thread.start do
|
58
|
+
system "cd #{RAILS_ROOT}; script/spec_server"
|
59
|
+
end
|
60
|
+
|
61
|
+
file_content = ""
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
describe "script/spec_server file without TextMate bundle" do
|
66
|
+
it_should_behave_like "script/spec_server file"
|
67
|
+
before(:each) do
|
68
|
+
start_spec_server
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
describe "script/spec_server file with TextMate bundle" do
|
73
|
+
it_should_behave_like "script/spec_server file"
|
74
|
+
before(:each) do
|
75
|
+
dir = File.dirname(__FILE__)
|
76
|
+
@tmbundle_install_directory = File.expand_path("#{Dir.tmpdir}/Library/Application Support/TextMate/Bundles")
|
77
|
+
@bundle_name = "RSpec.tmbundle"
|
78
|
+
FileUtils.mkdir_p(tmbundle_install_directory)
|
79
|
+
bundle_dir = File.expand_path("#{dir}/../../../../../../#{@bundle_name}")
|
80
|
+
File.directory?(bundle_dir).should be_true
|
81
|
+
unless system(%Q|ln -s #{bundle_dir} "#{tmbundle_install_directory}"|)
|
82
|
+
raise "Creating link to Textmate Bundle"
|
83
|
+
end
|
84
|
+
start_spec_server
|
85
|
+
end
|
86
|
+
|
87
|
+
after(:each) do
|
88
|
+
bundle_file_to_remove = "#{tmbundle_install_directory}/#{@bundle_name}"
|
89
|
+
if bundle_file_to_remove == "/"
|
90
|
+
raise "bundle file path resolved to '/' - could not call rm"
|
91
|
+
end
|
92
|
+
unless system(%Q|rm "#{bundle_file_to_remove}"|)
|
93
|
+
raise "Removing Textmate bundle link failed"
|
94
|
+
end
|
95
|
+
end
|
96
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dchelimsky-rspec-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.11.
|
4
|
+
version: 1.1.11.5
|
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:
|
12
|
+
date: 2009-01-04 00:00:00 -08:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
requirements:
|
20
20
|
- - "="
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: 1.1.11.
|
22
|
+
version: 1.1.11.5
|
23
23
|
version:
|
24
24
|
description: Behaviour Driven Development for Ruby on Rails.
|
25
25
|
email:
|
@@ -33,6 +33,7 @@ extra_rdoc_files:
|
|
33
33
|
- License.txt
|
34
34
|
- Manifest.txt
|
35
35
|
- README.txt
|
36
|
+
- TODO.txt
|
36
37
|
- generators/rspec/templates/previous_failures.txt
|
37
38
|
files:
|
38
39
|
- History.txt
|
@@ -40,6 +41,7 @@ files:
|
|
40
41
|
- Manifest.txt
|
41
42
|
- README.txt
|
42
43
|
- Rakefile
|
44
|
+
- TODO.txt
|
43
45
|
- features/step_definitions/people.rb
|
44
46
|
- features/support/env.rb
|
45
47
|
- features/transactions/transactions_should_rollback.feature
|
@@ -132,8 +134,8 @@ files:
|
|
132
134
|
- spec/resources/views/objects/_object.html.erb
|
133
135
|
- spec/resources/views/render_spec/_a_partial.rhtml
|
134
136
|
- spec/resources/views/render_spec/action_with_alternate_layout.rhtml
|
137
|
+
- spec/resources/views/render_spec/some_action.html.erb
|
135
138
|
- spec/resources/views/render_spec/some_action.js.rjs
|
136
|
-
- spec/resources/views/render_spec/some_action.rhtml
|
137
139
|
- spec/resources/views/render_spec/some_action.rjs
|
138
140
|
- spec/resources/views/rjs_spec/_replacement_partial.rhtml
|
139
141
|
- spec/resources/views/rjs_spec/hide_div.rjs
|
@@ -181,7 +183,6 @@ files:
|
|
181
183
|
- spec/spec/rails/interop/testcase_spec.rb
|
182
184
|
- spec/spec/rails/matchers/ar_be_valid_spec.rb
|
183
185
|
- spec/spec/rails/matchers/assert_select_spec.rb
|
184
|
-
- spec/spec/rails/matchers/description_generation_spec.rb
|
185
186
|
- spec/spec/rails/matchers/errors_on_spec.rb
|
186
187
|
- spec/spec/rails/matchers/have_text_spec.rb
|
187
188
|
- spec/spec/rails/matchers/include_text_spec.rb
|
@@ -222,6 +223,6 @@ rubyforge_project: rspec
|
|
222
223
|
rubygems_version: 1.2.0
|
223
224
|
signing_key:
|
224
225
|
specification_version: 2
|
225
|
-
summary: rspec-rails 1.1.11.
|
226
|
+
summary: rspec-rails 1.1.11.5
|
226
227
|
test_files: []
|
227
228
|
|
@@ -1,37 +0,0 @@
|
|
1
|
-
require File.dirname(__FILE__) + '/../../../spec_helper'
|
2
|
-
|
3
|
-
class DescriptionGenerationSpecController < ActionController::Base
|
4
|
-
def render_action
|
5
|
-
end
|
6
|
-
|
7
|
-
def redirect_action
|
8
|
-
redirect_to :action => :render_action
|
9
|
-
end
|
10
|
-
end
|
11
|
-
|
12
|
-
describe "Description generation", :type => :controller do
|
13
|
-
controller_name :description_generation_spec
|
14
|
-
|
15
|
-
after(:each) do
|
16
|
-
Spec::Matchers.clear_generated_description
|
17
|
-
end
|
18
|
-
|
19
|
-
it "should generate description for render_template" do
|
20
|
-
get 'render_action'
|
21
|
-
response.should render_template("render_action")
|
22
|
-
Spec::Matchers.generated_description.should == "should render template \"render_action\""
|
23
|
-
end
|
24
|
-
|
25
|
-
it "should generate description for render_template with full path" do
|
26
|
-
get 'render_action'
|
27
|
-
response.should render_template("description_generation_spec/render_action")
|
28
|
-
Spec::Matchers.generated_description.should == "should render template \"description_generation_spec/render_action\""
|
29
|
-
end
|
30
|
-
|
31
|
-
it "should generate description for redirect_to" do
|
32
|
-
get 'redirect_action'
|
33
|
-
response.should redirect_to("http://test.host/description_generation_spec/render_action")
|
34
|
-
Spec::Matchers.generated_description.should == "should redirect to \"http://test.host/description_generation_spec/render_action\""
|
35
|
-
end
|
36
|
-
|
37
|
-
end
|
File without changes
|