0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Capybaraで:js => trueのときだけテストに失敗する場合

Posted at

Capybaraでテストをしていた時にcapybara-webkit selenium-driverなどを入れて:js => trueでテストをすると失敗するということがあった。

:js => trueを外してテストすると成功するので原因を調べた。

http://stackoverflow.com/questions/8178120/capybara-with-js-true-causes-test-to-fail

transactionを忘れてた orz.

spec/spec_helper.rb

  config.use_transactional_fixtures = false

このへんも参考になりそう。

http://devblog.avdi.org/2012/08/31/configuring-database_cleaner-with-rails-rspec-capybara-and-selenium/

http://weilu.github.io/blog/2012/11/10/conditionally-switching-off-transactional-fixtures/

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?