我正在试着运行这个测试...
require 'spec_helper'
describe HomeController do
describe 'boilerplate routes' do
it "should route to '/about'" do
{ :get => "/about" }.should route_to(:controller => 'home', :action => 'show')
end
end
end..。并且它一直失败,并显示以下错误消息:
1) HomeController boilerplate routes should route to '/about'
Failure/Error: { :get => "/about" }.should route_to(:controller => 'home', :action => 'show')
NoMethodError:
undefined method `route_to' for #<RSpec::Core::ExampleGroup::Nested_1::Nested_1:0x00000101499650>
# ./spec/routes/home_routes_spec.rb:8:in `block (3 levels) in <top (required)>'我将rspec-rails 2.5.0与rails 3.0.5 & rspec 2.5.1一起使用。
我正在做我的代码,就像它在rdocs中所说的那样,试图跟随this example code...我做错了什么?帮助!
发布于 2011-03-11 01:55:49
https://stackoverflow.com/questions/5249927
复制相似问题