rspec-rails 1.1.11 → 1.1.12
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +29 -0
- data/Manifest.txt +94 -94
- data/README.txt +5 -7
- data/Rakefile +14 -2
- data/{spec_resources/views/controller_spec/_partial.rhtml → TODO.txt} +0 -0
- data/features/step_definitions/people.rb +6 -0
- data/features/support/env.rb +13 -0
- data/{stories/transactions_should_rollback → features/transactions/transactions_should_rollback.feature} +4 -3
- data/generators/rspec/rspec_generator.rb +0 -4
- data/generators/rspec/templates/rspec.rake +130 -104
- data/generators/rspec/templates/script/spec_server +17 -8
- data/generators/rspec/templates/spec_helper.rb +1 -1
- data/generators/rspec_default_values.rb +3 -3
- data/generators/rspec_scaffold/templates/edit_erb_spec.rb +7 -6
- data/generators/rspec_scaffold/templates/index_erb_spec.rb +9 -8
- data/generators/rspec_scaffold/templates/new_erb_spec.rb +7 -6
- data/generators/rspec_scaffold/templates/show_erb_spec.rb +9 -9
- data/lib/spec/rails.rb +14 -2
- data/lib/spec/rails/example/controller_example_group.rb +16 -23
- data/lib/spec/rails/example/cookies_proxy.rb +5 -1
- data/lib/spec/rails/example/functional_example_group.rb +17 -5
- data/lib/spec/rails/example/helper_example_group.rb +5 -4
- data/lib/spec/rails/example/rails_example_group.rb +10 -15
- data/lib/spec/rails/example/view_example_group.rb +5 -5
- data/lib/spec/rails/extensions.rb +1 -3
- data/lib/spec/rails/extensions/action_controller/base.rb +1 -1
- data/lib/spec/rails/extensions/action_controller/rescue.rb +9 -5
- data/lib/spec/rails/extensions/action_controller/test_response.rb +11 -2
- data/lib/spec/rails/extensions/action_view/base.rb +4 -2
- data/lib/spec/rails/extensions/active_record/base.rb +1 -2
- data/lib/spec/rails/extensions/spec/{example → runner}/configuration.rb +12 -7
- data/lib/spec/rails/matchers.rb +1 -0
- data/lib/spec/rails/matchers/ar_be_valid.rb +41 -0
- data/lib/spec/rails/matchers/redirect_to.rb +4 -2
- data/lib/spec/rails/matchers/render_template.rb +30 -10
- data/lib/spec/rails/mocks.rb +11 -8
- data/lib/spec/rails/version.rb +3 -2
- data/rspec-rails.gemspec +16 -8
- data/spec/{rails/autotest → autotest}/mappings_spec.rb +3 -3
- data/{spec_resources → spec/resources}/controllers/action_view_base_spec_controller.rb +0 -0
- data/spec/resources/controllers/application.rb +9 -0
- data/{spec_resources → spec/resources}/controllers/controller_spec_controller.rb +19 -6
- data/{spec_resources → spec/resources}/controllers/redirect_spec_controller.rb +7 -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 +8 -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/models/animal.rb +4 -0
- data/spec/resources/models/person.rb +18 -0
- data/spec/resources/models/thing.rb +3 -0
- data/{spec_resources/views/controller_spec/action_setting_the_assigns_hash.rhtml → 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/views/layouts/application.rhtml → 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/views/layouts/simple.rhtml → spec/resources/views/layouts/application.rhtml} +0 -0
- data/{spec_resources/views/render_spec/_a_partial.rhtml → spec/resources/views/layouts/simple.rhtml} +0 -0
- data/{spec_resources → spec/resources}/views/objects/_object.html.erb +0 -0
- data/{spec_resources/views/render_spec/action_with_alternate_layout.rhtml → spec/resources/views/render_spec/_a_partial.rhtml} +0 -0
- data/{spec_resources/views/render_spec/some_action.rhtml → spec/resources/views/render_spec/action_with_alternate_layout.rhtml} +0 -0
- data/{spec_resources/views/view_spec/_partial_used_twice.rhtml → spec/resources/views/render_spec/some_action.html.erb} +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.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/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/views/view_spec/path_params.html.erb +1 -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/spec/{rails → spec/rails}/example/assigns_hash_proxy_spec.rb +1 -1
- data/spec/spec/rails/example/configuration_spec.rb +79 -0
- data/spec/{rails → spec/rails}/example/controller_isolation_spec.rb +1 -7
- data/spec/{rails → spec/rails}/example/controller_spec_spec.rb +63 -6
- data/spec/{rails → spec/rails}/example/cookies_proxy_spec.rb +30 -13
- data/spec/{rails → spec/rails}/example/example_group_factory_spec.rb +1 -1
- data/spec/{rails → spec/rails}/example/helper_spec_spec.rb +28 -1
- data/spec/{rails → spec/rails}/example/model_spec_spec.rb +1 -1
- data/spec/{rails → spec/rails}/example/shared_behaviour_spec.rb +1 -1
- data/spec/{rails → spec/rails}/example/test_unit_assertion_accessibility_spec.rb +1 -1
- data/spec/{rails → spec/rails}/example/view_spec_spec.rb +22 -1
- data/spec/{rails → spec/rails}/extensions/action_controller_rescue_action_spec.rb +4 -1
- data/spec/{rails → spec/rails}/extensions/action_view_base_spec.rb +1 -1
- data/spec/{rails → spec/rails}/extensions/active_record_spec.rb +1 -1
- data/spec/{rails → spec/rails}/interop/testcase_spec.rb +6 -2
- data/spec/spec/rails/matchers/ar_be_valid_spec.rb +35 -0
- data/spec/{rails → spec/rails}/matchers/assert_select_spec.rb +1 -5
- data/spec/{rails → spec/rails}/matchers/errors_on_spec.rb +1 -1
- data/spec/{rails → spec/rails}/matchers/have_text_spec.rb +1 -1
- data/spec/{rails → spec/rails}/matchers/include_text_spec.rb +1 -1
- data/spec/{rails → spec/rails}/matchers/redirect_to_spec.rb +11 -2
- data/spec/{rails → spec/rails}/matchers/render_template_spec.rb +8 -4
- data/spec/{rails → spec/rails}/matchers/should_change_spec.rb +1 -1
- data/spec/{rails → spec/rails}/mocks/ar_classes.rb +0 -0
- data/spec/{rails → spec/rails}/mocks/mock_model_spec.rb +1 -1
- data/spec/{rails → spec/rails}/mocks/stub_model_spec.rb +1 -1
- data/spec/{rails → spec/rails}/sample_modified_fixture.rb +1 -1
- data/spec/{rails → spec/rails}/sample_spec.rb +1 -1
- data/spec/spec/rails/spec_server_spec.rb +96 -0
- data/spec/{rails → spec/rails}/spec_spec.rb +1 -1
- data/spec/spec_helper.rb +23 -14
- metadata +111 -100
- data/UPGRADE +0 -7
- data/generators/rspec/templates/all_stories.rb +0 -4
- data/generators/rspec/templates/stories_helper.rb +0 -3
- data/lib/spec/rails/extensions/object.rb +0 -5
- data/spec/rails/example/configuration_spec.rb +0 -83
- data/spec/rails/matchers/description_generation_spec.rb +0 -37
- data/spec/rails/spec_server_spec.rb +0 -96
- data/stories/all.rb +0 -10
- data/stories/configuration/stories.rb +0 -5
- data/stories/helper.rb +0 -6
- data/stories/steps/people.rb +0 -8
- data/stories/transactions_should_rollback.rb +0 -25
data/stories/all.rb
DELETED
@@ -1,10 +0,0 @@
|
|
1
|
-
require File.join(File.dirname(__FILE__), *%w[helper])
|
2
|
-
require File.join(File.dirname(__FILE__), *%w[steps people])
|
3
|
-
|
4
|
-
# Run transactions_should_rollback in Ruby
|
5
|
-
require File.join(File.dirname(__FILE__), *%w[transactions_should_rollback])
|
6
|
-
|
7
|
-
# Run transactions_should_rollback in Plain Text
|
8
|
-
with_steps_for :people do
|
9
|
-
run File.join(File.dirname(__FILE__), *%w[transactions_should_rollback]), :type => RailsStory
|
10
|
-
end
|
data/stories/helper.rb
DELETED
data/stories/steps/people.rb
DELETED
@@ -1,25 +0,0 @@
|
|
1
|
-
require File.join(File.dirname(__FILE__), *%w[helper])
|
2
|
-
|
3
|
-
Story "transactions should rollback", %{
|
4
|
-
As an RSpec/Rails Story author
|
5
|
-
I want transactions to roll back between scenarios
|
6
|
-
So that I can have confidence in the state of the database
|
7
|
-
}, :type => RailsStory do
|
8
|
-
Scenario "add one Person" do
|
9
|
-
When "I add a Person" do
|
10
|
-
Person.create!(:name => "Foo")
|
11
|
-
end
|
12
|
-
end
|
13
|
-
|
14
|
-
Scenario "add another person" do
|
15
|
-
GivenScenario "add one Person"
|
16
|
-
Then "there should be one person" do
|
17
|
-
Person.count.should == 1
|
18
|
-
end
|
19
|
-
end
|
20
|
-
|
21
|
-
Scenario "add yet another person" do
|
22
|
-
GivenScenario "add one Person"
|
23
|
-
Then "there should be one person"
|
24
|
-
end
|
25
|
-
end
|