Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: rspec/rspec-rails
...
head fork: rspec/rspec-rails
Checking mergeability… Don't worry, you can still create the pull request.
  • 4 commits
  • 17 files changed
  • 0 commit comments
  • 1 contributor
View
8 History.md
@@ -1,5 +1,13 @@
## rspec-rails-2 release history
+### 2.4.1 / 2011-01-03
+
+[full changelog](http://github.com/rspec/rspec-rails/compare/v2.4.0...2.4.1)
+
+* Bug fixes
+ * fixed bug caused by including some Rails modules before RSpec's
+ RailsExampleGroup
+
### 2.4.0 / 2011-01-02
[full changelog](http://github.com/rspec/rspec-rails/compare/v2.3.1...2.4.0)
View
2  features/README.md
@@ -23,7 +23,7 @@ This installs the following gems:
Add rspec-rails to the :test and :development groups in the Gemfile:
group :test, :development do
- gem "rspec-rails", "~> 2.0.1"
+ gem "rspec-rails", "~> 2.4"
end
It needs to be in the :development group to expose generators and rake tasks
View
8 features/controller_specs/README.md
@@ -5,10 +5,10 @@ A controller spec is an RSpec wrapper for a Rails functional test
(ActionController::TestCase::Behavior). It allows you to simulate a single
http request in each example, and then specify expected outcomes, including:
-* templates that are rendered by the action
-* instance variables that are assigned in the controller to be shared with the
- view
-* cookies that get sent back with the response
+* rendered templates
+* redirects
+* instance variables assigned in the controller to be shared with the view
+* cookies sent back with the response
To specify outcomes, you can use:
View
4 features/controller_specs/render_views.feature
@@ -1,7 +1,7 @@
Feature: render_views
- You can tell a controller example group to render views with the render_views
- declaration.
+ You can tell a controller example group to render views with the
+ `render_views` declaration.
Scenario: expect template that exists and is rendered by controller (passes)
Given a file named "spec/controllers/widgets_controller_spec.rb" with:
View
5 features/helper_specs/helper_spec.feature
@@ -1,7 +1,8 @@
Feature: helper spec
- Helper specs live in `spec/helpers`. In order to access the helper methods
- you can call them on the `helper` object.
+ Helper specs live in `spec/helpers`, or any example group with `:type =>
+ :helper`. In order to access the helper methods you can call them on the
+ `helper` object.
Scenario: helper method that returns true
Given a file named "spec/helpers/application_helper_spec.rb" with:
View
8 features/matchers/new_record_matcher.feature
@@ -1,10 +1,10 @@
Feature: be_a_new matcher
- The be_a_new matcher accepts a class and passes if the subject is an instance
- of that class that returns true to new_record?
+ The `be_a_new` matcher accepts a class and passes if the subject is an
+ instance of that class that returns false to persisted?
- You can also call "with" on be_a_new with a hash of attributes to specify the
- subject has equal attributes.
+ You can also chain `with` on `be_a_new` with a hash of attributes to specify
+ the subject has equal attributes.
Scenario: example spec with four be_a_new possibilities
Given a file named "spec/models/widget_spec.rb" with:
View
9 features/matchers/redirect_to_matcher.feature
@@ -1,9 +1,8 @@
Feature: redirect_to matcher
- The redirect_to matcher is used to specify that the redirect called
- in the latest action ended with the intended behaviour. Essentially,
- it delegates to "assert_redirect". For more info, please check out
- the Rails documentation on this method.
+ The `redirect_to` matcher is used to specify that the redirect called in the
+ latest action ended with the intended behaviour. Essentially, it delegates to
+ [`assert_redirected_to`](http://api.rubyonrails.org/classes/ActionDispatch/Assertions/ResponseAssertions.html#method-i-assert_redirected_to).
It is available in controller specs (spec/controllers) and request
specs (spec/requests).
@@ -38,4 +37,4 @@ Feature: redirect_to matcher
end
"""
When I run "rspec spec/controllers/widgets_controller_spec.rb"
- Then the output should contain "4 examples, 0 failures"
+ Then the output should contain "4 examples, 0 failures"
View
10 features/model_specs/README.md
@@ -1,7 +1,9 @@
-Model specs live in spec/models, e.g. spec/models/account_spec.rb. A model spec
-is a thin wrapper for an ActiveSupport::TestCase, and includes all of the
-behavior and assertions that it provides, in addition to RSpec's own behavior
-and expectations.
+Model specs live in `spec/models` or any example group with
+`:type => :model`.
+
+A model spec is a thin wrapper for an ActiveSupport::TestCase, and includes all
+of the behavior and assertions that it provides, in addition to RSpec's own
+behavior and expectations.
## Examples
View
3  lib/rspec/rails/example/controller_example_group.rb
@@ -72,9 +72,8 @@ module RSpec::Rails
#
module ControllerExampleGroup
extend ActiveSupport::Concern
-
- include ActionController::TestCase::Behavior
include RSpec::Rails::RailsExampleGroup
+ include ActionController::TestCase::Behavior
include RSpec::Rails::ViewRendering
include RSpec::Rails::Matchers::RedirectTo
include RSpec::Rails::Matchers::RenderTemplate
View
3  lib/rspec/rails/example/helper_example_group.rb
@@ -27,9 +27,8 @@ module RSpec::Rails
#
module HelperExampleGroup
extend ActiveSupport::Concern
-
- include ActionView::TestCase::Behavior
include RSpec::Rails::RailsExampleGroup
+ include ActionView::TestCase::Behavior
include RSpec::Rails::ViewAssigns
include RSpec::Rails::BrowserSimulators
View
3  lib/rspec/rails/example/mailer_example_group.rb
@@ -2,9 +2,8 @@
module RSpec::Rails
module MailerExampleGroup
extend ActiveSupport::Concern
-
- include ActionMailer::TestCase::Behavior
include RSpec::Rails::RailsExampleGroup
+ include ActionMailer::TestCase::Behavior
include RSpec::Rails::BrowserSimulators
webrat do
View
1  lib/rspec/rails/example/model_example_group.rb
@@ -1,7 +1,6 @@
module RSpec::Rails
module ModelExampleGroup
extend ActiveSupport::Concern
-
include RSpec::Rails::RailsExampleGroup
included do
View
1  lib/rspec/rails/example/rails_example_group.rb
@@ -2,7 +2,6 @@ module RSpec
module Rails
module RailsExampleGroup
extend ActiveSupport::Concern
-
include RSpec::Rails::SetupAndTeardownAdapter
include RSpec::Rails::TestUnitAssertionAdapter
end
View
3  lib/rspec/rails/example/request_example_group.rb
@@ -13,10 +13,9 @@ module RSpec::Rails
# => delegates to assert_redirected_to(destination)
module RequestExampleGroup
extend ActiveSupport::Concern
-
+ include RSpec::Rails::RailsExampleGroup
include ActionDispatch::Integration::Runner
include ActionDispatch::Assertions
- include RSpec::Rails::RailsExampleGroup
include RSpec::Rails::BrowserSimulators
module InstanceMethods
View
3  lib/rspec/rails/example/routing_example_group.rb
@@ -3,9 +3,8 @@
module RSpec::Rails
module RoutingExampleGroup
extend ActiveSupport::Concern
-
- include ActionDispatch::Assertions::RoutingAssertions
include RSpec::Rails::RailsExampleGroup
+ include ActionDispatch::Assertions::RoutingAssertions
include RSpec::Rails::Matchers::RoutingMatchers
module InstanceMethods
View
3  lib/rspec/rails/example/view_example_group.rb
@@ -19,9 +19,8 @@ module RSpec::Rails
# end
module ViewExampleGroup
extend ActiveSupport::Concern
-
- include ActionView::TestCase::Behavior
include RSpec::Rails::RailsExampleGroup
+ include ActionView::TestCase::Behavior
include RSpec::Rails::ViewAssigns
include RSpec::Rails::Matchers::RenderTemplate
include RSpec::Rails::BrowserSimulators
View
2  lib/rspec/rails/version.rb
@@ -1,7 +1,7 @@
module RSpec # :nodoc:
module Rails # :nodoc:
module Version # :nodoc:
- STRING = '2.4.0'
+ STRING = '2.4.1'
end
end
end

No commit comments for this range

Something went wrong with that request. Please try again.