当我这样运行时,:focus => true
它工作正常:
it "should send by email to new user", :js => true, :focus => true do
...
end
但是,当我删除:focus => true
并运行完整的测试套件时,我在该测试中收到此错误。
Failure/Error: Unable to find matching line from backtrace
这似乎与:js => true
可能有关,因为这是我开始使用它的第一个测试。当我自己运行一个测试时,capybara-webkit 会在屏幕上打印一堆警告。
但是当我运行完整的套件时,我没有看到来自 webkit 的警告,所以它几乎就像它没有被加载一样。
有任何想法吗?谢谢我真的很感激!
如果您对此感到好奇,这里是我的 gemfile 的相关部分:
group :test do
gem "rspec-rails", '2.10.1'
gem "ruby_gntp", '0.3.4'
gem 'capybara', '1.1.2'
gem 'capybara-webkit', '0.11.0' # requires "brew install qt"
gem 'guard-rspec', '0.6.0'
gem 'mocha', '0.10.0'
gem 'spork', '~> 1.0rc'
gem 'guard-spork', '0.5.2'
gem 'launchy', '2.0.5'
end