我的应用程序助手中有视图助手方法:
module ApplicationHelper
def formatted_something(something)
"Hello, #{something}"
end
end
我想在我的请求规范中访问该方法:
require "spec_helper"
describe "something" do
include RequestSpecHelper
it "should display blogs list" do
visit something_url
page.should have_content formatted_something(@something.something)
end
end
它找不到formatted_something方法。