How to set before(:suite) and after(:suite) RSpec hooks in Queue Mode (Percy.io example)?
See new docs for Percy integration.
For Knapsack Pro versions older than 7.0 and percy-capybara older than 4.0, keep reading.
Replace:
before(:suite) { Percy::Capybara.initialize_build }
after(:suite) { Percy::Capybara.finalize_build }
with:
KnapsackPro::Hooks::Queue.before_queue { |queue_id| Percy::Capybara.initialize_build }
KnapsackPro::Hooks::Queue.after_queue { |queue_id| Percy::Capybara.finalize_build }
Otherwise, Knapsack Pro would call before(:suite)
and after(:suite)
for each batch of tests fetched from the Queue API.