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

No commit comments for this range

Something went wrong with that request. Please try again.