dchelimsky-rspec-rails 1.1.11 → 1.1.11.1
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +10 -0
- data/Manifest.txt +52 -52
- data/Rakefile +1 -1
- data/generators/rspec/templates/rspec.rake +118 -97
- data/generators/rspec_scaffold/templates/edit_erb_spec.rb +7 -6
- data/generators/rspec_scaffold/templates/index_erb_spec.rb +8 -7
- data/generators/rspec_scaffold/templates/new_erb_spec.rb +7 -6
- data/generators/rspec_scaffold/templates/show_erb_spec.rb +8 -8
- data/lib/spec/rails/example/controller_example_group.rb +4 -1
- data/lib/spec/rails/example/view_example_group.rb +5 -5
- data/lib/spec/rails/extensions/action_view/base.rb +4 -2
- data/lib/spec/rails/matchers/render_template.rb +19 -9
- data/lib/spec/rails/version.rb +2 -1
- data/rspec-rails.gemspec +14 -7
- data/spec/rails/example/configuration_spec.rb +51 -55
- data/spec/rails/example/view_spec_spec.rb +21 -0
- data/spec/spec_helper.rb +14 -14
- metadata +56 -56
- /data/{spec_resources → spec/resources}/controllers/action_view_base_spec_controller.rb +0 -0
- /data/{spec_resources → spec/resources}/controllers/controller_spec_controller.rb +0 -0
- /data/{spec_resources → spec/resources}/controllers/redirect_spec_controller.rb +0 -0
- /data/{spec_resources → spec/resources}/controllers/render_spec_controller.rb +0 -0
- /data/{spec_resources → spec/resources}/controllers/rjs_spec_controller.rb +0 -0
- /data/{spec_resources → spec/resources}/helpers/addition_helper.rb +0 -0
- /data/{spec_resources → spec/resources}/helpers/explicit_helper.rb +0 -0
- /data/{spec_resources → spec/resources}/helpers/more_explicit_helper.rb +0 -0
- /data/{spec_resources → spec/resources}/helpers/plugin_application_helper.rb +0 -0
- /data/{spec_resources → spec/resources}/helpers/view_spec_helper.rb +0 -0
- /data/{spec_resources → spec/resources}/views/controller_spec/_partial.rhtml +0 -0
- /data/{spec_resources → spec/resources}/views/controller_spec/action_setting_flash_after_session_reset.rhtml +0 -0
- /data/{spec_resources → spec/resources}/views/controller_spec/action_setting_flash_before_session_reset.rhtml +0 -0
- /data/{spec_resources → spec/resources}/views/controller_spec/action_setting_the_assigns_hash.rhtml +0 -0
- /data/{spec_resources → spec/resources}/views/controller_spec/action_with_errors_in_template.rhtml +0 -0
- /data/{spec_resources → spec/resources}/views/controller_spec/action_with_template.rhtml +0 -0
- /data/{spec_resources → spec/resources}/views/layouts/application.rhtml +0 -0
- /data/{spec_resources → spec/resources}/views/layouts/simple.rhtml +0 -0
- /data/{spec_resources → spec/resources}/views/objects/_object.html.erb +0 -0
- /data/{spec_resources → spec/resources}/views/render_spec/_a_partial.rhtml +0 -0
- /data/{spec_resources → spec/resources}/views/render_spec/action_with_alternate_layout.rhtml +0 -0
- /data/{spec_resources → spec/resources}/views/render_spec/some_action.js.rjs +0 -0
- /data/{spec_resources → spec/resources}/views/render_spec/some_action.rhtml +0 -0
- /data/{spec_resources → spec/resources}/views/render_spec/some_action.rjs +0 -0
- /data/{spec_resources → spec/resources}/views/rjs_spec/_replacement_partial.rhtml +0 -0
- /data/{spec_resources → spec/resources}/views/rjs_spec/hide_div.rjs +0 -0
- /data/{spec_resources → spec/resources}/views/rjs_spec/hide_page_element.rjs +0 -0
- /data/{spec_resources → spec/resources}/views/rjs_spec/insert_html.rjs +0 -0
- /data/{spec_resources → spec/resources}/views/rjs_spec/replace.rjs +0 -0
- /data/{spec_resources → spec/resources}/views/rjs_spec/replace_html.rjs +0 -0
- /data/{spec_resources → spec/resources}/views/rjs_spec/replace_html_with_partial.rjs +0 -0
- /data/{spec_resources → spec/resources}/views/rjs_spec/visual_effect.rjs +0 -0
- /data/{spec_resources → spec/resources}/views/rjs_spec/visual_toggle_effect.rjs +0 -0
- /data/{spec_resources → spec/resources}/views/tag_spec/no_tags.rhtml +0 -0
- /data/{spec_resources → spec/resources}/views/tag_spec/single_div_with_no_attributes.rhtml +0 -0
- /data/{spec_resources → spec/resources}/views/tag_spec/single_div_with_one_attribute.rhtml +0 -0
- /data/{spec_resources → spec/resources}/views/view_spec/_partial.rhtml +0 -0
- /data/{spec_resources → spec/resources}/views/view_spec/_partial_used_twice.rhtml +0 -0
- /data/{spec_resources → spec/resources}/views/view_spec/_partial_with_local_variable.rhtml +0 -0
- /data/{spec_resources → spec/resources}/views/view_spec/_partial_with_sub_partial.rhtml +0 -0
- /data/{spec_resources → spec/resources}/views/view_spec/_spacer.rhtml +0 -0
- /data/{spec_resources → spec/resources}/views/view_spec/accessor.rhtml +0 -0
- /data/{spec_resources → spec/resources}/views/view_spec/block_helper.rhtml +0 -0
- /data/{spec_resources → spec/resources}/views/view_spec/entry_form.rhtml +0 -0
- /data/{spec_resources → spec/resources}/views/view_spec/explicit_helper.rhtml +0 -0
- /data/{spec_resources → spec/resources}/views/view_spec/foo/show.rhtml +0 -0
- /data/{spec_resources → spec/resources}/views/view_spec/implicit_helper.rhtml +0 -0
- /data/{spec_resources → spec/resources}/views/view_spec/multiple_helpers.rhtml +0 -0
- /data/{spec_resources → spec/resources}/views/view_spec/should_not_receive.rhtml +0 -0
- /data/{spec_resources → spec/resources}/views/view_spec/template_with_partial.rhtml +0 -0
- /data/{spec_resources → spec/resources}/views/view_spec/template_with_partial_using_collection.rhtml +0 -0
- /data/{spec_resources → spec/resources}/views/view_spec/template_with_partial_with_array.rhtml +0 -0
data/rspec-rails.gemspec
CHANGED
@@ -2,27 +2,34 @@
|
|
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.1"
|
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{2008-
|
9
|
+
s.date = %q{2008-11-24}
|
10
10
|
s.description = %q{Behaviour Driven Development for Ruby on Rails.}
|
11
11
|
s.email = ["rspec-devel@rubyforge.org"]
|
12
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", "UPGRADE", "generators/rspec/CHANGES", "generators/rspec/rspec_generator.rb", "generators/rspec/templates/all_stories.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/templates/stories_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/object.rb", "lib/spec/rails/extensions/spec/example/configuration.rb", "lib/spec/rails/extensions/spec/matchers/have.rb", "lib/spec/rails/interop/testcase.rb", "lib/spec/rails/matchers.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/rails/autotest/mappings_spec.rb", "spec/rails/example/assigns_hash_proxy_spec.rb", "spec/rails/example/configuration_spec.rb", "spec/rails/example/controller_isolation_spec.rb", "spec/rails/example/controller_spec_spec.rb", "spec/rails/example/cookies_proxy_spec.rb", "spec/rails/example/example_group_factory_spec.rb", "spec/rails/example/helper_spec_spec.rb", "spec/rails/example/model_spec_spec.rb", "spec/rails/example/shared_behaviour_spec.rb", "spec/rails/example/test_unit_assertion_accessibility_spec.rb", "spec/rails/example/view_spec_spec.rb", "spec/rails/extensions/action_controller_rescue_action_spec.rb", "spec/rails/extensions/action_view_base_spec.rb", "spec/rails/extensions/active_record_spec.rb", "spec/rails/interop/testcase_spec.rb", "spec/rails/matchers/assert_select_spec.rb", "spec/rails/matchers/description_generation_spec.rb", "spec/rails/matchers/errors_on_spec.rb", "spec/rails/matchers/have_text_spec.rb", "spec/rails/matchers/include_text_spec.rb", "spec/rails/matchers/redirect_to_spec.rb", "spec/rails/matchers/render_template_spec.rb", "spec/rails/matchers/should_change_spec.rb", "spec/rails/mocks/ar_classes.rb", "spec/rails/mocks/mock_model_spec.rb", "spec/rails/mocks/stub_model_spec.rb", "spec/rails/sample_modified_fixture.rb", "spec/rails/sample_spec.rb", "spec/rails/spec_server_spec.rb", "spec/rails/spec_spec.rb", "spec/rails_suite.rb", "spec/
|
13
|
+
s.files = ["History.txt", "License.txt", "Manifest.txt", "README.txt", "Rakefile", "UPGRADE", "generators/rspec/CHANGES", "generators/rspec/rspec_generator.rb", "generators/rspec/templates/all_stories.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/templates/stories_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/object.rb", "lib/spec/rails/extensions/spec/example/configuration.rb", "lib/spec/rails/extensions/spec/matchers/have.rb", "lib/spec/rails/interop/testcase.rb", "lib/spec/rails/matchers.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/rails/autotest/mappings_spec.rb", "spec/rails/example/assigns_hash_proxy_spec.rb", "spec/rails/example/configuration_spec.rb", "spec/rails/example/controller_isolation_spec.rb", "spec/rails/example/controller_spec_spec.rb", "spec/rails/example/cookies_proxy_spec.rb", "spec/rails/example/example_group_factory_spec.rb", "spec/rails/example/helper_spec_spec.rb", "spec/rails/example/model_spec_spec.rb", "spec/rails/example/shared_behaviour_spec.rb", "spec/rails/example/test_unit_assertion_accessibility_spec.rb", "spec/rails/example/view_spec_spec.rb", "spec/rails/extensions/action_controller_rescue_action_spec.rb", "spec/rails/extensions/action_view_base_spec.rb", "spec/rails/extensions/active_record_spec.rb", "spec/rails/interop/testcase_spec.rb", "spec/rails/matchers/assert_select_spec.rb", "spec/rails/matchers/description_generation_spec.rb", "spec/rails/matchers/errors_on_spec.rb", "spec/rails/matchers/have_text_spec.rb", "spec/rails/matchers/include_text_spec.rb", "spec/rails/matchers/redirect_to_spec.rb", "spec/rails/matchers/render_template_spec.rb", "spec/rails/matchers/should_change_spec.rb", "spec/rails/mocks/ar_classes.rb", "spec/rails/mocks/mock_model_spec.rb", "spec/rails/mocks/stub_model_spec.rb", "spec/rails/sample_modified_fixture.rb", "spec/rails/sample_spec.rb", "spec/rails/spec_server_spec.rb", "spec/rails/spec_spec.rb", "spec/rails_suite.rb", "spec/resources/controllers/action_view_base_spec_controller.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/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.js.rjs", "spec/resources/views/render_spec/some_action.rhtml", "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/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_helper.rb", "stories/all.rb", "stories/configuration/stories.rb", "stories/helper.rb", "stories/steps/people.rb", "stories/transactions_should_rollback", "stories/transactions_should_rollback.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
|
-
s.rubygems_version = %q{1.3.
|
20
|
-
s.summary = %q{rspec-rails 1.1.11}
|
19
|
+
s.rubygems_version = %q{1.3.1}
|
20
|
+
s.summary = %q{rspec-rails 1.1.11.1}
|
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
|
-
end
|
26
25
|
|
27
|
-
|
26
|
+
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
27
|
+
s.add_runtime_dependency(%q<rspec>, ["= 1.1.11.1"])
|
28
|
+
s.add_development_dependency(%q<hoe>, [">= 1.8.2"])
|
29
|
+
else
|
30
|
+
s.add_dependency(%q<rspec>, ["= 1.1.11.1"])
|
31
|
+
end
|
32
|
+
else
|
33
|
+
s.add_dependency(%q<rspec>, ["= 1.1.11.1"])
|
34
|
+
end
|
28
35
|
end
|
@@ -2,82 +2,78 @@ require File.dirname(__FILE__) + '/../../spec_helper'
|
|
2
2
|
|
3
3
|
module Spec
|
4
4
|
module Example
|
5
|
-
describe Configuration
|
6
|
-
before(:each) { @config = Configuration.new }
|
7
|
-
end
|
8
|
-
|
9
|
-
describe Configuration, "#use_transactional_fixtures" do
|
10
|
-
it_should_behave_like "Spec::Example::Configuration"
|
5
|
+
describe Configuration do
|
11
6
|
|
12
|
-
|
13
|
-
@config
|
7
|
+
def config
|
8
|
+
@config ||= Configuration.new
|
14
9
|
end
|
15
10
|
|
16
|
-
|
17
|
-
|
18
|
-
|
11
|
+
describe "#use_transactional_fixtures" do
|
12
|
+
it "should return Test::Unit::TestCase.use_transactional_fixtures" do
|
13
|
+
config.use_transactional_fixtures.should == Test::Unit::TestCase.use_transactional_fixtures
|
19
14
|
end
|
20
|
-
@config.use_transactional_fixtures = false
|
21
|
-
end
|
22
15
|
|
23
|
-
|
24
|
-
|
25
|
-
|
16
|
+
it "should set Test::Unit::TestCase.use_transactional_fixtures to false" do
|
17
|
+
Configuration::EXAMPLE_GROUP_CLASSES.each do |example_group|
|
18
|
+
example_group.should_receive(:use_transactional_fixtures=).with(false)
|
19
|
+
end
|
20
|
+
config.use_transactional_fixtures = false
|
26
21
|
end
|
27
|
-
@config.use_transactional_fixtures = true
|
28
|
-
end
|
29
|
-
end
|
30
|
-
|
31
|
-
describe Configuration, "#use_instantiated_fixtures" do
|
32
|
-
it_should_behave_like "Spec::Example::Configuration"
|
33
|
-
|
34
|
-
it "should return Test::Unit::TestCase.use_transactional_fixtures" do
|
35
|
-
@config.use_instantiated_fixtures.should == Test::Unit::TestCase.use_instantiated_fixtures
|
36
|
-
end
|
37
22
|
|
38
|
-
|
39
|
-
|
40
|
-
|
23
|
+
it "should set Test::Unit::TestCase.use_transactional_fixtures to true" do
|
24
|
+
Configuration::EXAMPLE_GROUP_CLASSES.each do |example_group|
|
25
|
+
example_group.should_receive(:use_transactional_fixtures=).with(true)
|
26
|
+
end
|
27
|
+
config.use_transactional_fixtures = true
|
41
28
|
end
|
42
|
-
@config.use_instantiated_fixtures = false
|
43
29
|
end
|
44
30
|
|
45
|
-
|
46
|
-
|
47
|
-
|
31
|
+
describe "#use_instantiated_fixtures" do
|
32
|
+
it "should return Test::Unit::TestCase.use_transactional_fixtures" do
|
33
|
+
config.use_instantiated_fixtures.should == Test::Unit::TestCase.use_instantiated_fixtures
|
48
34
|
end
|
49
|
-
@config.use_instantiated_fixtures = true
|
50
|
-
end
|
51
|
-
end
|
52
35
|
|
53
|
-
|
54
|
-
|
36
|
+
it "should set Test::Unit::TestCase.use_instantiated_fixtures to false" do
|
37
|
+
Configuration::EXAMPLE_GROUP_CLASSES.each do |example_group|
|
38
|
+
example_group.should_receive(:use_instantiated_fixtures=).with(false)
|
39
|
+
end
|
40
|
+
config.use_instantiated_fixtures = false
|
41
|
+
end
|
55
42
|
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
43
|
+
it "should set Test::Unit::TestCase.use_instantiated_fixtures to true" do
|
44
|
+
Configuration::EXAMPLE_GROUP_CLASSES.each do |example_group|
|
45
|
+
example_group.should_receive(:use_instantiated_fixtures=).with(true)
|
46
|
+
end
|
47
|
+
config.use_instantiated_fixtures = true
|
60
48
|
end
|
61
49
|
end
|
62
50
|
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
51
|
+
describe "#fixture_path" do
|
52
|
+
it "should default to RAILS_ROOT + '/spec/fixtures'" do
|
53
|
+
config.fixture_path.should == RAILS_ROOT + '/spec/fixtures'
|
54
|
+
Configuration::EXAMPLE_GROUP_CLASSES.each do |example_group|
|
55
|
+
example_group.fixture_path.should == RAILS_ROOT + '/spec/fixtures'
|
56
|
+
end
|
68
57
|
end
|
69
|
-
end
|
70
|
-
end
|
71
58
|
|
72
|
-
|
73
|
-
|
59
|
+
it "should set fixture_path" do
|
60
|
+
config.fixture_path = "/new/path"
|
61
|
+
config.fixture_path.should == "/new/path"
|
62
|
+
Configuration::EXAMPLE_GROUP_CLASSES.each do |example_group|
|
63
|
+
example_group.fixture_path.should == "/new/path"
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
74
67
|
|
75
|
-
|
76
|
-
|
77
|
-
example_group
|
68
|
+
describe "#global_fixtures" do
|
69
|
+
it "should set fixtures on TestCase" do
|
70
|
+
Configuration::EXAMPLE_GROUP_CLASSES.each do |example_group|
|
71
|
+
example_group.should_receive(:fixtures).with(:blah)
|
72
|
+
end
|
73
|
+
config.global_fixtures = [:blah]
|
78
74
|
end
|
79
|
-
@config.global_fixtures = [:blah]
|
80
75
|
end
|
76
|
+
|
81
77
|
end
|
82
78
|
end
|
83
79
|
end
|
@@ -249,6 +249,27 @@ describe "render 'view_spec/foo/show.rhtml'", :type => :view do
|
|
249
249
|
end
|
250
250
|
end
|
251
251
|
|
252
|
+
describe "setting path parameters", :type => :view do
|
253
|
+
describe "(controller)" do
|
254
|
+
it "should supercede the default path parameters" do
|
255
|
+
render "view_spec/entry_form", :path_parameters => {:controller => 'foo'}
|
256
|
+
request.path_parameters[:controller].should == 'foo'
|
257
|
+
end
|
258
|
+
end
|
259
|
+
describe "(action)" do
|
260
|
+
it "should supercede the default path parameters" do
|
261
|
+
render "view_spec/entry_form", :path_parameters => {:action => 'foo'}
|
262
|
+
request.path_parameters[:action].should == 'foo'
|
263
|
+
end
|
264
|
+
end
|
265
|
+
describe "(something arbitrary)" do
|
266
|
+
it "should supercede the default path parameters" do
|
267
|
+
render "view_spec/entry_form", :path_parameters => {:foo => 'bar'}
|
268
|
+
request.path_parameters[:foo].should == 'bar'
|
269
|
+
end
|
270
|
+
end
|
271
|
+
end
|
272
|
+
|
252
273
|
module Spec
|
253
274
|
module Rails
|
254
275
|
module Example
|
data/spec/spec_helper.rb
CHANGED
@@ -1,19 +1,19 @@
|
|
1
1
|
dir = File.dirname(__FILE__)
|
2
2
|
$LOAD_PATH.unshift(File.expand_path("#{dir}/../rspec/lib"))
|
3
|
-
$LOAD_PATH.unshift(File.expand_path("#{dir}
|
4
|
-
$LOAD_PATH.unshift(File.expand_path("#{dir}
|
3
|
+
$LOAD_PATH.unshift(File.expand_path("#{dir}/resources/controllers"))
|
4
|
+
$LOAD_PATH.unshift(File.expand_path("#{dir}/resources/helpers"))
|
5
5
|
require File.expand_path("#{dir}/../../../../spec/spec_helper")
|
6
|
-
require File.expand_path("#{dir}
|
7
|
-
require File.expand_path("#{dir}
|
8
|
-
require File.expand_path("#{dir}
|
9
|
-
require File.expand_path("#{dir}
|
10
|
-
require File.expand_path("#{dir}
|
11
|
-
require File.expand_path("#{dir}
|
12
|
-
require File.expand_path("#{dir}
|
13
|
-
require File.expand_path("#{dir}
|
14
|
-
require File.expand_path("#{dir}
|
15
|
-
|
16
|
-
extra_controller_paths = File.expand_path("#{dir}
|
6
|
+
require File.expand_path("#{dir}/resources/controllers/render_spec_controller")
|
7
|
+
require File.expand_path("#{dir}/resources/controllers/rjs_spec_controller")
|
8
|
+
require File.expand_path("#{dir}/resources/controllers/redirect_spec_controller")
|
9
|
+
require File.expand_path("#{dir}/resources/controllers/action_view_base_spec_controller")
|
10
|
+
require File.expand_path("#{dir}/resources/helpers/addition_helper")
|
11
|
+
require File.expand_path("#{dir}/resources/helpers/explicit_helper")
|
12
|
+
require File.expand_path("#{dir}/resources/helpers/more_explicit_helper")
|
13
|
+
require File.expand_path("#{dir}/resources/helpers/view_spec_helper")
|
14
|
+
require File.expand_path("#{dir}/resources/helpers/plugin_application_helper")
|
15
|
+
|
16
|
+
extra_controller_paths = File.expand_path("#{dir}/resources/controllers")
|
17
17
|
|
18
18
|
unless ActionController::Routing.controller_paths.include?(extra_controller_paths)
|
19
19
|
ActionController::Routing.instance_eval {@possible_controllers = nil}
|
@@ -24,7 +24,7 @@ module Spec
|
|
24
24
|
module Rails
|
25
25
|
module Example
|
26
26
|
class ViewExampleGroupController
|
27
|
-
set_view_path File.join(File.dirname(__FILE__), "..", "
|
27
|
+
set_view_path File.join(File.dirname(__FILE__), "..", "spec", "resources", "views")
|
28
28
|
end
|
29
29
|
end
|
30
30
|
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.1
|
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: 2008-
|
12
|
+
date: 2008-11-24 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.1
|
23
23
|
version:
|
24
24
|
description: Behaviour Driven Development for Ruby on Rails.
|
25
25
|
email:
|
@@ -137,59 +137,59 @@ files:
|
|
137
137
|
- spec/rails/spec_server_spec.rb
|
138
138
|
- spec/rails/spec_spec.rb
|
139
139
|
- spec/rails_suite.rb
|
140
|
+
- spec/resources/controllers/action_view_base_spec_controller.rb
|
141
|
+
- spec/resources/controllers/controller_spec_controller.rb
|
142
|
+
- spec/resources/controllers/redirect_spec_controller.rb
|
143
|
+
- spec/resources/controllers/render_spec_controller.rb
|
144
|
+
- spec/resources/controllers/rjs_spec_controller.rb
|
145
|
+
- spec/resources/helpers/addition_helper.rb
|
146
|
+
- spec/resources/helpers/explicit_helper.rb
|
147
|
+
- spec/resources/helpers/more_explicit_helper.rb
|
148
|
+
- spec/resources/helpers/plugin_application_helper.rb
|
149
|
+
- spec/resources/helpers/view_spec_helper.rb
|
150
|
+
- spec/resources/views/controller_spec/_partial.rhtml
|
151
|
+
- spec/resources/views/controller_spec/action_setting_flash_after_session_reset.rhtml
|
152
|
+
- spec/resources/views/controller_spec/action_setting_flash_before_session_reset.rhtml
|
153
|
+
- spec/resources/views/controller_spec/action_setting_the_assigns_hash.rhtml
|
154
|
+
- spec/resources/views/controller_spec/action_with_errors_in_template.rhtml
|
155
|
+
- spec/resources/views/controller_spec/action_with_template.rhtml
|
156
|
+
- spec/resources/views/layouts/application.rhtml
|
157
|
+
- spec/resources/views/layouts/simple.rhtml
|
158
|
+
- spec/resources/views/objects/_object.html.erb
|
159
|
+
- spec/resources/views/render_spec/_a_partial.rhtml
|
160
|
+
- spec/resources/views/render_spec/action_with_alternate_layout.rhtml
|
161
|
+
- spec/resources/views/render_spec/some_action.js.rjs
|
162
|
+
- spec/resources/views/render_spec/some_action.rhtml
|
163
|
+
- spec/resources/views/render_spec/some_action.rjs
|
164
|
+
- spec/resources/views/rjs_spec/_replacement_partial.rhtml
|
165
|
+
- spec/resources/views/rjs_spec/hide_div.rjs
|
166
|
+
- spec/resources/views/rjs_spec/hide_page_element.rjs
|
167
|
+
- spec/resources/views/rjs_spec/insert_html.rjs
|
168
|
+
- spec/resources/views/rjs_spec/replace.rjs
|
169
|
+
- spec/resources/views/rjs_spec/replace_html.rjs
|
170
|
+
- spec/resources/views/rjs_spec/replace_html_with_partial.rjs
|
171
|
+
- spec/resources/views/rjs_spec/visual_effect.rjs
|
172
|
+
- spec/resources/views/rjs_spec/visual_toggle_effect.rjs
|
173
|
+
- spec/resources/views/tag_spec/no_tags.rhtml
|
174
|
+
- spec/resources/views/tag_spec/single_div_with_no_attributes.rhtml
|
175
|
+
- spec/resources/views/tag_spec/single_div_with_one_attribute.rhtml
|
176
|
+
- spec/resources/views/view_spec/_partial.rhtml
|
177
|
+
- spec/resources/views/view_spec/_partial_used_twice.rhtml
|
178
|
+
- spec/resources/views/view_spec/_partial_with_local_variable.rhtml
|
179
|
+
- spec/resources/views/view_spec/_partial_with_sub_partial.rhtml
|
180
|
+
- spec/resources/views/view_spec/_spacer.rhtml
|
181
|
+
- spec/resources/views/view_spec/accessor.rhtml
|
182
|
+
- spec/resources/views/view_spec/block_helper.rhtml
|
183
|
+
- spec/resources/views/view_spec/entry_form.rhtml
|
184
|
+
- spec/resources/views/view_spec/explicit_helper.rhtml
|
185
|
+
- spec/resources/views/view_spec/foo/show.rhtml
|
186
|
+
- spec/resources/views/view_spec/implicit_helper.rhtml
|
187
|
+
- spec/resources/views/view_spec/multiple_helpers.rhtml
|
188
|
+
- spec/resources/views/view_spec/should_not_receive.rhtml
|
189
|
+
- spec/resources/views/view_spec/template_with_partial.rhtml
|
190
|
+
- spec/resources/views/view_spec/template_with_partial_using_collection.rhtml
|
191
|
+
- spec/resources/views/view_spec/template_with_partial_with_array.rhtml
|
140
192
|
- spec/spec_helper.rb
|
141
|
-
- spec_resources/controllers/action_view_base_spec_controller.rb
|
142
|
-
- spec_resources/controllers/controller_spec_controller.rb
|
143
|
-
- spec_resources/controllers/redirect_spec_controller.rb
|
144
|
-
- spec_resources/controllers/render_spec_controller.rb
|
145
|
-
- spec_resources/controllers/rjs_spec_controller.rb
|
146
|
-
- spec_resources/helpers/addition_helper.rb
|
147
|
-
- spec_resources/helpers/explicit_helper.rb
|
148
|
-
- spec_resources/helpers/more_explicit_helper.rb
|
149
|
-
- spec_resources/helpers/plugin_application_helper.rb
|
150
|
-
- spec_resources/helpers/view_spec_helper.rb
|
151
|
-
- spec_resources/views/controller_spec/_partial.rhtml
|
152
|
-
- spec_resources/views/controller_spec/action_setting_flash_after_session_reset.rhtml
|
153
|
-
- spec_resources/views/controller_spec/action_setting_flash_before_session_reset.rhtml
|
154
|
-
- spec_resources/views/controller_spec/action_setting_the_assigns_hash.rhtml
|
155
|
-
- spec_resources/views/controller_spec/action_with_errors_in_template.rhtml
|
156
|
-
- spec_resources/views/controller_spec/action_with_template.rhtml
|
157
|
-
- spec_resources/views/layouts/application.rhtml
|
158
|
-
- spec_resources/views/layouts/simple.rhtml
|
159
|
-
- spec_resources/views/objects/_object.html.erb
|
160
|
-
- spec_resources/views/render_spec/_a_partial.rhtml
|
161
|
-
- spec_resources/views/render_spec/action_with_alternate_layout.rhtml
|
162
|
-
- spec_resources/views/render_spec/some_action.js.rjs
|
163
|
-
- spec_resources/views/render_spec/some_action.rhtml
|
164
|
-
- spec_resources/views/render_spec/some_action.rjs
|
165
|
-
- spec_resources/views/rjs_spec/_replacement_partial.rhtml
|
166
|
-
- spec_resources/views/rjs_spec/hide_div.rjs
|
167
|
-
- spec_resources/views/rjs_spec/hide_page_element.rjs
|
168
|
-
- spec_resources/views/rjs_spec/insert_html.rjs
|
169
|
-
- spec_resources/views/rjs_spec/replace.rjs
|
170
|
-
- spec_resources/views/rjs_spec/replace_html.rjs
|
171
|
-
- spec_resources/views/rjs_spec/replace_html_with_partial.rjs
|
172
|
-
- spec_resources/views/rjs_spec/visual_effect.rjs
|
173
|
-
- spec_resources/views/rjs_spec/visual_toggle_effect.rjs
|
174
|
-
- spec_resources/views/tag_spec/no_tags.rhtml
|
175
|
-
- spec_resources/views/tag_spec/single_div_with_no_attributes.rhtml
|
176
|
-
- spec_resources/views/tag_spec/single_div_with_one_attribute.rhtml
|
177
|
-
- spec_resources/views/view_spec/_partial.rhtml
|
178
|
-
- spec_resources/views/view_spec/_partial_used_twice.rhtml
|
179
|
-
- spec_resources/views/view_spec/_partial_with_local_variable.rhtml
|
180
|
-
- spec_resources/views/view_spec/_partial_with_sub_partial.rhtml
|
181
|
-
- spec_resources/views/view_spec/_spacer.rhtml
|
182
|
-
- spec_resources/views/view_spec/accessor.rhtml
|
183
|
-
- spec_resources/views/view_spec/block_helper.rhtml
|
184
|
-
- spec_resources/views/view_spec/entry_form.rhtml
|
185
|
-
- spec_resources/views/view_spec/explicit_helper.rhtml
|
186
|
-
- spec_resources/views/view_spec/foo/show.rhtml
|
187
|
-
- spec_resources/views/view_spec/implicit_helper.rhtml
|
188
|
-
- spec_resources/views/view_spec/multiple_helpers.rhtml
|
189
|
-
- spec_resources/views/view_spec/should_not_receive.rhtml
|
190
|
-
- spec_resources/views/view_spec/template_with_partial.rhtml
|
191
|
-
- spec_resources/views/view_spec/template_with_partial_using_collection.rhtml
|
192
|
-
- spec_resources/views/view_spec/template_with_partial_with_array.rhtml
|
193
193
|
- stories/all.rb
|
194
194
|
- stories/configuration/stories.rb
|
195
195
|
- stories/helper.rb
|
@@ -222,6 +222,6 @@ rubyforge_project: rspec
|
|
222
222
|
rubygems_version: 1.2.0
|
223
223
|
signing_key:
|
224
224
|
specification_version: 2
|
225
|
-
summary: rspec-rails 1.1.11
|
225
|
+
summary: rspec-rails 1.1.11.1
|
226
226
|
test_files: []
|
227
227
|
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
/data/{spec_resources → spec/resources}/views/controller_spec/action_setting_the_assigns_hash.rhtml
RENAMED
File without changes
|
/data/{spec_resources → spec/resources}/views/controller_spec/action_with_errors_in_template.rhtml
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
/data/{spec_resources → spec/resources}/views/render_spec/action_with_alternate_layout.rhtml
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
/data/{spec_resources → spec/resources}/views/view_spec/template_with_partial_using_collection.rhtml
RENAMED
File without changes
|
/data/{spec_resources → spec/resources}/views/view_spec/template_with_partial_with_array.rhtml
RENAMED
File without changes
|