Displaying 1 result from an estimated 1 matches for "adfsdfsdf".
Did you mean:
sdfsdfsdf
2010 Aug 30
1
undefined method `route_for' for #<RSpec::Core::ExampleGroup::Nested_1::Nested_1:
...controller_spec.rb.
after all, test is:
require ''spec_helper''
describe PostsController do
render_views
describe "route generation" do
it "should be successful" do
@post = Post.new(:title => ''blalbla'', :name => ''adfsdfsdf'')
@post.save
route_for(:controller => "posts", :action => "show", :id =>
@post.id, :method => ''GET'').should == "/posts/show" + @post.id.to_s
end
end
end
I have Post model and it works just fine (rspec tested fin...