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

noreply at rubyforge.org noreply at rubyforge.org
Tue Nov 21 04:09:05 EST 2006

Bugs item #6780, was opened at 2006-11-19 14:49
You can respond by visiting: 

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

Initial Comment:

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"

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

I've got the rails plugin installed as

In /vendor/plugins/rspec_on_rails/lib/spec/rails/context/controller.rb
line #131

changed to 

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

Gustav Paul
gustav at rails.co.za


Comment By: Marcus Roberts (marcusr)
Date: 2006-11-21 09:09

I see the same problem.  I'm running on edge rails (REVISION_5587) using RSPec gem 0.7.2  and Rspec Rails plugin checked out with ruby script/plugin install svn://rubyforge.org/var/svn/rspec/tags/REL_0_7_2/vendor/rspec_on_rails/vendor/plugins/rspec.

Removing the [0] from the same line (line number 142 in my version) of /vendor/plugins/rspec_on_rails/lib/spec/rails/context/controller.rb removes the error of

"47 should == "/customers" in my own test



Comment By: Aslak Hellesøy (aslak_hellesoy)
Date: 2006-11-20 15:04

He's probably on edge rails. I think edge rails and 1.1.6 rails behave differently. In edge rails the [0] must go away. Maybe we need to do different things based on RAILS_VERSION or something.


Comment By: David Chelimsky (dchelimsky)
Date: 2006-11-20 03:36

Gustav - I added a spec for this and it passed right away. It's committed in revision (1126).

What version of RSpec were you using when this happened? Trunk revision? Rails version?



You can respond by visiting: 

More information about the rspec-devel mailing list