[rspec-devel] [ rspec-Bugs-6780 ] routing() was failing...fix included

noreply at rubyforge.org noreply at rubyforge.org
Sun Nov 19 09:49:46 EST 2006


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

Category: rails plugin
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Gustav Paul (gustavpaul)
Assigned to: Nobody (None)
Summary: routing() was failing...fix included

Initial Comment:
Hey

I have the following route in my config/routes.rb:

map.connect 'login', :controller => 'member', :action => 'login'

my spec looks as follows

#no def setup or anything similar...
specify "/member/login should route to /login" do
  routing(:controller => 'member', :action => 'login').should_eql "/login"
end

Was failing, reporting inequality of 47 and '/login'
"/login"[0] happened to be char code 47

I've got the rails plugin installed as
/vendor/plugins/rspec_on_rails

In /vendor/plugins/rspec_on_rails/lib/spec/rails/context/controller.rb
line #131
Was:
ActionController::Routing::Routes.generate(options)[0]

changed to 
ActionController::Routing::Routes.generate(options)

Working perfectly now...
Might have introduced other bugs, but I though I'd let you guys know...

Cheery-o
Gustav Paul
gustav at rails.co.za


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

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


More information about the rspec-devel mailing list