I was wondering if there is a way for certain lanes to skip the before_all
or after_all
blocks for certain/specified lanes?
Thanks!
One way to do this:
before_all do |lane|
if lane == :test
puts "Do something for test"
else
puts "foo"
end
end
addition relating to your comment
lanes = [:test, :foo, :bar]
lanes.include?(:test) # => true
lanes.include?(:baz) # => false
so you can do something like
before_all do |lane|
lanes_to_say_foo = [:test, :build, :other]
if lanes_to_say_foo.include?(lane)
puts "Foo"
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