[rspec-users] rspec-rails 2.0.0.beta.12 showing undefined method error for route_to

Daniel Salmeron Amselem daniel.amselem at gmail.com
Mon Jun 21 07:56:28 EDT 2010

I forgot to add the error:

1) AccountsController Routes should route to new action with GET
    Failure/Error: { :get => "/accounts/new" }.should
route_to(:controller => "accounts", :action => "new")
    undefined method `route_to' for
    # /Users/damselem/.rvm/gems/ruby-1.9.1-p378 at rails3/gems/
routing.rb:175:in `method_missing'
    # ./spec/controllers/accounts_controller_spec.rb:8:in `block (3
levels) in <top (required)>'

On Jun 20, 8:58 pm, Daniel Salmeron Amselem <daniel.amse... at gmail.com>
> First of all, I've been trying to find an answer for this problem all
> over the internet without luck.
> The thing is that I am using RVM with ruby 1.9.2-head and I created a
> new empty gemset. Then I installed bundler gem with:
> gem bundler install
> That installed the library into the /Users/damselem/.rvm/gems/
> ruby-1.9.2-head at rails3/gems directory. Then I went to my rails 3 app
> directory and I ran "bundle install" which showed this:
> http://gist.github.com/446011
> and when I ran gem list I got:
> http://gist.github.com/446005
> Everything seems perfect, but when running some route specs I got an
> undefined method error for route_to method. I've checked in the github
> repository and it actually exists. So I decided to look inside the
> library but I couldn't find the /rspec/rails/matchers/
> routing_spec_matchers.rb directory and either the matchers directory.
> So, my question is: Why is not the file in there? Why is not the
> matchers directory either?
> Then I found under /Users/damselem/.rvm/gems/ruby-1.9.2-head at rails3/ a
> bundler directory with some gems, and with folder names like:
> devise-d498cf3a4e1a3fef3f4f071d4feec6a489efe480-master
> formtastic-8ab93b34c3a97eee21e38185e14bed2f769c81e5-rails3
> shoulda-b78dbf514bbce3272023d3a4742474857c2eb3c3-master
> Why is that? Why there are two different directories for gems? Why are
> devise, formtastic and shoulda not in the gems directory?
> Thank you very much, and sorry for asking so many questions, but I'm
> quite lost with all this.
> _______________________________________________
> rspec-users mailing list
> rspec-us... at rubyforge.orghttp://rubyforge.org/mailman/listinfo/rspec-users

More information about the rspec-users mailing list