2016-03-08 00:52:19 +00:00
|
|
|
# frozen_string_literal: true
|
2018-01-08 20:23:54 +00:00
|
|
|
|
2016-08-17 18:41:40 +00:00
|
|
|
RSpec.shared_context "Capybara Features", capybara_feature: true do
|
|
|
|
instance_eval do
|
|
|
|
alias background before
|
|
|
|
alias given let
|
|
|
|
alias given! let!
|
2016-07-22 17:21:24 +00:00
|
|
|
end
|
2016-08-17 18:41:40 +00:00
|
|
|
end
|
2016-07-22 17:21:24 +00:00
|
|
|
|
2016-08-17 18:41:40 +00:00
|
|
|
# ensure shared_context is included if default shared_context_metadata_behavior is changed
|
|
|
|
if RSpec::Core::Version::STRING.to_f >= 3.5
|
2014-06-12 23:45:16 +00:00
|
|
|
RSpec.configure do |config|
|
2016-08-17 18:41:40 +00:00
|
|
|
config.include_context "Capybara Features", capybara_feature: true
|
2014-06-12 23:45:16 +00:00
|
|
|
end
|
2016-08-17 18:41:40 +00:00
|
|
|
end
|
2011-02-11 13:44:58 +00:00
|
|
|
|
2016-08-17 18:41:40 +00:00
|
|
|
RSpec.configure do |config|
|
|
|
|
config.alias_example_group_to :feature, capybara_feature: true, type: :feature
|
|
|
|
config.alias_example_group_to :xfeature, capybara_feature: true, type: :feature, skip: "Temporarily disabled with xfeature"
|
|
|
|
config.alias_example_group_to :ffeature, capybara_feature: true, type: :feature, focus: true
|
|
|
|
config.alias_example_to :scenario
|
|
|
|
config.alias_example_to :xscenario, skip: "Temporarily disabled with xscenario"
|
|
|
|
config.alias_example_to :fscenario, focus: true
|
2014-06-14 03:02:20 +00:00
|
|
|
end
|