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
Post a Comment