Skip to content

Commit b357227

Browse files
committed
Try workaround fix I found
1 parent 3b94e8f commit b357227

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

features/support/env.rb

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,17 @@
55

66
require "bundler"
77
Bundler.setup
8-
require "aruba/cucumber"
9-
require "aruba/config/jruby" if RUBY_ENGINE == "jruby"
8+
# require order matters, capybara needs to be there before aruba for the RSpec shadowing fix to work (see slightly below)
109
require "capybara/cucumber"
1110
require "capybara/apparition"
11+
require "aruba/cucumber"
12+
require "aruba/config/jruby" if RUBY_ENGINE == "jruby"
1213
require "simplecov"
1314

15+
# Small workaround I found for the RSpec/aruba shadowing problem showcased in https://github.com/PragTob/all_conflict/
16+
# It _seems_ to work for now but it's definitely not ideal. Wish this was fixed in Capybara.
17+
Aruba::Api::Core.include(Capybara::RSpecMatcherProxies)
18+
1419
# Rack app for Capybara which returns the latest coverage report from Aruba temp project dir
1520
coverage_dir = File.expand_path("../../tmp/aruba/project/coverage/", __dir__)
1621
Capybara.app = Rack::Builder.new do

0 commit comments

Comments
 (0)