当我向他们添加":js => true"时,我在许多测试中遇到了类似的错误.例如:
An error occurred in an after hook
ActionController::RoutingError: No route matches [GET] "/assets"
occurred at /Users/appletart/.rvm/gems/ruby-1.9.3-p0@eventful2/gems/actionpack-3.2.5/lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
Run Code Online (Sandbox Code Playgroud)
我以前没有在我的应用程序中测试启用JavaScript的东西,只是通过升级到Capybara 2并安装Database Cleaner来设置这样做.config.use_transactional_fixtures = false,我在我的spec_helper文件中添加了一些前/后钩子(钩子?),我直接从这里接受的答案中复制了.
我在跑:
任何人都可以告诉我如何攻击这个?非常感谢!
4) Event pages 'CREATE' submitting a valid form provides a success notification and displays new event's page
Failure/Error: Unable to find matching line from backtrace
ActionController::RoutingError:
No route matches [GET] "/assets"
# /Users/appletart/.rvm/gems/ruby-1.9.3-p0@eventful2/gems/actionpack-3.2.5/lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
# /Users/appletart/.rvm/gems/ruby-1.9.3-p0@eventful2/gems/actionpack-3.2.5/lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
# /Users/appletart/.rvm/gems/ruby-1.9.3-p0@eventful2/gems/railties-3.2.5/lib/rails/rack/logger.rb:26:in `call_app'
# /Users/appletart/.rvm/gems/ruby-1.9.3-p0@eventful2/gems/railties-3.2.5/lib/rails/rack/logger.rb:16:in `call'
# /Users/appletart/.rvm/gems/ruby-1.9.3-p0@eventful2/gems/actionpack-3.2.5/lib/action_dispatch/middleware/request_id.rb:22:in …Run Code Online (Sandbox Code Playgroud)