ruby on rails - Run block once before all capybara tests -


i'm using capybara rspec integration testing rails app. there way run before block once before first capybara test runs without running before every feature spec? putting block in rspec.configure block such causes run before each feature spec:

rspec.configure |config|     config.before(:all, type: :feature)       # stuff     end end 

i think overengineering task. since run once, run it:

cb = lambda { puts 'i run once' } rspec.configure |config|   cb.call end 

Comments

Popular posts from this blog

timeout - Handshake_timeout on RabbitMQ using python and pika from remote vm -

gcc - MinGW's ld cannot perform PE operations on non PE output file -

c# - Search and Add Comment with OpenXML for Word -