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

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

firemonkey - How do I make a beep sound in Android using Delphi and the API? -