[rspec-devel] [ rspec-Bugs-6558 ] integrated views look for template even when redirected

noreply at rubyforge.org noreply at rubyforge.org
Wed Nov 8 05:15:03 EST 2006


Bugs item #6558, was opened at 2006-11-08 10:15
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3149&aid=6558&group_id=797

Category: rails plugin
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Jerry West (jjw)
Assigned to: Nobody (None)
Summary: integrated views look for template even when redirected

Initial Comment:
require File.dirname(__FILE__) + '/../spec_helper'

class TestController < ActionController::Base
  def go() redirect_to "http://test.host/" end
end

context 'Test Controller' do
  controller_name :test
  integrate_views

  specify 'redirects as requested' do
    get :go
    response.should_be_redirect
    response.redirect_url.should_be "http://test.host"
  end
end

fails:

spec -fs spec/controllers/test_controller_spec.rb
Creating sqlite in memory database...

Test Controller
- redirects as requested (FAILED - 1)

1)
ActionController::MissingTemplate in 'Test Controller redirects as requested'
Missing template /home/jjw/work/northants/config/../app/views/test/go.rhtml
/usr/local/lib/site_ruby/1.8/benchmark.rb:300:in `measure'
/home/jjw/work/northants/vendor/plugins/rspec/lib/spec/rails/context/controller.rb:46:in `render'
/usr/local/lib/site_ruby/1.8/benchmark.rb:300:in `measure'
./spec/controllers/test_controller_spec.rb:18:in `redirects as requested'

Finished in 0.013349 seconds

1 specification, 1 failure

------

In the application this is abstracted from, the actual redirect is followed so it looks like an rspec issue.



----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3149&aid=6558&group_id=797


More information about the rspec-devel mailing list