I'm trying to use the Rspec before(:suite) hook with a tag like so:
config.before(:suite, :selenium => true) do
#magical awesomeness
end
but Rspec doesn't seem to respect the tag and runs the code I only want to run with : selenium => true regardless.
The weird part is that I'm doing a very similar thing with the :each hook as well and that seems to work fine:
config.around(:each, :selenium => true) do |example|
Capybara.using_wait_time(10) do
Capybara.using_driver(:selenium) do
example.run
end
end
end
Anyone know what I'm doing wrong?
This should work:
if config.inclusion_filter[:selenium]
config.before(:suite) do
#magical awesomeness
end
end
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With