Invalidate Sprockets cache during RSpec automated test

大城市里の小女人 提交于 2019-12-05 12:29:38

I don't know how to do what you asked. But you could consider setting myTimer to the value you want it to be in the feature specs that need it to be a specific value.

Assuming you're using Capybara, you can run Javascript in a feature spec with

page.execute_script('// some Javascript')

You might need to rearrange your Javascript a bit first to put myTimer somewhere where a script can change it.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!