1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
|
begin
require "active_job"
rescue LoadError # rubocop:disable Lint/SuppressedException
end
begin
require "action_cable"
rescue LoadError # rubocop:disable Lint/SuppressedException
end
begin
require "active_storage"
require "action_mailbox"
rescue LoadError # rubocop:disable Lint/SuppressedException
end
require "rails/version"
require "rspec/rails/feature_check"
Then /^the example(s)? should( all)? pass$/ do |_, _|
step 'the output should contain "0 failures"'
step 'the exit status should be 0'
end
Then /^the example(s)? should( all)? fail/ do |_, _|
step 'the output should not contain "0 failures"'
step 'the exit status should not be 0'
end
Given /active job is available/ do
unless RSpec::Rails::FeatureCheck.has_active_job?
pending "ActiveJob is not available"
end
end
Given /action cable testing is available/ do
unless RSpec::Rails::FeatureCheck.has_action_cable_testing?
pending "Action Cable testing is not available"
end
end
Given /action mailbox is available/ do
unless RSpec::Rails::FeatureCheck.has_action_mailbox?
pending "Action Mailbox is not available"
end
end
|