I'm using cucumber and capybara to do our ATs and I'm trying to replace celerity/culerity with webkit and I'm wondering if anyone knows of a way to have each scenario run a method (the same method开发者_如何学Go) before executing each test. Something along the lines of before :each...
Would you consider using RSpec / Capybara?
I know you asked about Cucumber / Capybara but I recently switched over from Cucumber / Capybara to Rspec / Capybara for integration tests and have found it really intuitive.
If you are open to trying it out, you should be able to configure it in your spec_helper like so:
config.around(:each) do |example|
your_method
example.run
end
You can also tag particular specs as well:
config.around(:each, :your_tag => true) do |example|
your_method
example.run
end
精彩评论