ruby on rails - Rspec: before each on js:true specs only -


for js:true feature specs e.g.

scenario "test something", js: true end 

i want run arbitrary code e.g

visit signin_path 

i know within spec_helper.rb

config.before(:each)  visit signin_path end 

but want run specs js:true

is there way this?

yes, specify separate before(:each, js: true) block in spec_helper.rb

rspec.configure |config|   config.before(:each, js: true)      visit signin_path   end end 

Comments

Popular posts from this blog

html - jquery - p element wont show after I hid it -

python - BeautifulSoup: How to get the nearest tag -

php - Return Last Insert ID with PDO -