File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change 55
66require "bundler"
77Bundler . setup
8- # require order matters, capybara needs to be there before aruba for the RSpec shadowing fix to work (see slightly below)
98require "capybara/cucumber"
109require "capybara/apparition"
1110require "aruba/cucumber"
1211require "aruba/config/jruby" if RUBY_ENGINE == "jruby"
1312require "simplecov"
1413
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 )
14+ # Monkey-patching Capybara::DSL if Capybara::DSLRSpecProxyInstaller has no `extended` hook
15+ unless Module . new . extend ( RSpec ::Matchers ) . extend ( Capybara ::DSL ) . singleton_class . ancestors . include? ( Capybara ::RSpecMatcherProxies )
16+ Capybara ::DSL . extend ( Module . new {
17+ def extended ( base )
18+ base . extend ( ::Capybara ::RSpecMatcherProxies ) if defined? ( ::RSpec ::Matchers ) && base . is_a? ( ::RSpec ::Matchers )
19+ super
20+ end
21+ } )
22+ end
1823
1924# Rack app for Capybara which returns the latest coverage report from Aruba temp project dir
2025coverage_dir = File . expand_path ( "../../tmp/aruba/project/coverage/" , __dir__ )
You can’t perform that action at this time.
0 commit comments