我正在使用Cucumber在我的RoR应用上测试google oauth
场景如下:
@omniauth_test
Scenario: Sign in via Google
Given I am on the Home Page
When I follow "Sign In"
Then I should be on the Sign In Page
When I follow "Sign in with Google"
Then I should be on the User Home Page
env.rb包含:
Before('@omniauth_test') do
OmniAuth.config.test_mode = true
Capybara.default_host = "http://example.com"
Capybara.current_driver = :webkit
OmniAuth.config.add_mock(:google_oauth2, {
:uid => '12345',
:info => {
:name => 'googleuser'
}
})
end
After('@omniauth_test') do
OmniAuth.config.test_mode = false
end
使用"黄瓜功能/ sign_in.feature"
在黄瓜下执行测试我发现了这个错误:
No route matches [GET] "/assets/images/grayscale/intro-bg.jpg" (ActionController::RoutingError)
但.feature文件和bootstrap css中的所有步骤都可以正常工作
有人可以帮帮我吗?
由于