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.
  • 3 commits
  • 4 files changed
  • 0 commit comments
  • 1 contributor
Commits on Jan 07, 2013
@alindeman alindeman Fixes Changelog link fdbba27
Commits on Jan 12, 2013
@alindeman alindeman Revert "Anonymous controllers define `_routes`"
This reverts commit 09793f8.

* We ended up breaking specs that relied on non-anonymous routes. We
  will investigate a better solution for 2.13 instead.
d9a72a9
@alindeman alindeman Bumps version to 2.12.2
[ci skip]
c4fb3d2
View
12 Changelog.md
@@ -1,5 +1,15 @@
+### 2.12.2 / 2013-01-12
+[full changelog](http://github.com/rspec/rspec-rails/compare/v2.12.1...v2.12.2)
+
+Bug fixes
+
+* Reverts earlier fix where anonymous controllers defined the `_routes` method
+ to support testing of redirection and generation of URLs from other contexts.
+ The implementation ended up breaking the ability to refer to non-anonymous
+ routes in the context of the controller under test.
+
### 2.12.1 / 2013-01-07
-[full changelog](http://github.com/rspec/rspec-rails/compare/v2.12.0...master)
+[full changelog](http://github.com/rspec/rspec-rails/compare/v2.12.0...v2.12.1)
Bug fixes
View
32 features/controller_specs/anonymous_controller.feature
@@ -351,35 +351,3 @@ Feature: anonymous controller
"""
When I run `rspec spec`
Then the examples should all pass
-
- Scenario: redirecting via a before_filter in ApplicationController
- Given a file named "spec/controllers/application_controller_spec.rb" with:
- """ruby
- require "spec_helper"
-
- class ApplicationController < ActionController::Base
- private
-
- def redirect_to_index
- redirect_to(:action => :index)
- end
- end
-
- describe ApplicationController do
- controller do
- before_filter :redirect_to_index, :only => :show
-
- def show
- end
- end
-
- context "GET #show" do
- it "redirects to the index page" do
- get :show, :id => 1
- expect(response).to redirect_to(:action => :index)
- end
- end
- end
- """
- When I run `rspec spec`
- Then the examples should all pass
View
3  lib/rspec/rails/example/controller_example_group.rb
@@ -66,9 +66,6 @@ def self.name; "AnonymousController"; end
before do
@orig_routes, @routes = @routes, ActionDispatch::Routing::RouteSet.new
@routes.draw { resources :anonymous }
-
- routes = @routes
- described_class.send(:define_method, :_routes) { routes }
end
after do
View
2  lib/rspec/rails/version.rb
@@ -1,7 +1,7 @@
module RSpec
module Rails
module Version
- STRING = '2.12.1'
+ STRING = '2.12.2'
end
end
end

No commit comments for this range

Something went wrong with that request. Please try again.