1
0
Fork 0
mirror of https://github.com/teamcapybara/capybara.git synced 2022-11-09 12:08:07 -05:00

Update testing to JRuby 9.1.8.0

This commit is contained in:
Thomas Walpole 2017-05-04 12:35:46 -07:00
parent 2cd5e376d0
commit d3344f3b1f
2 changed files with 6 additions and 8 deletions

View file

@ -4,7 +4,7 @@ dist: trusty
rvm:
- 2.4.1
- 2.3.3
- jruby-9.1.7.0
- jruby-9.1.8.0
- rbx-3
gemfile:
- Gemfile
@ -90,7 +90,7 @@ matrix:
- gemfile: gemfiles/Gemfile.beta-versions
- gemfile: gemfiles/Gemfile.edge-marionette
- rvm: rbx-3
- rvm: jruby-9.1.7.0
- rvm: jruby-9.1.8.0
- gemfile: Gemfile
rvm: 2.4.1
env: CAPYBARA_CHROME_HEADLESS=true

View file

@ -34,6 +34,8 @@ RSpec.shared_examples "Capybara::Session" do |session, mode|
before do
@current_dir = Dir.getwd
Dir.chdir(File.join(File.dirname(__FILE__), '..'))
@env = { 'SELENIUM_BROWSER' => @session.driver.options[:browser].to_s }
@env['LEGACY_FIREFOX'] = 'TRUE' if mode == :selenium_firefox
end
after do
@ -41,16 +43,12 @@ RSpec.shared_examples "Capybara::Session" do |session, mode|
end
it "should have return code 1 when running selenium_driver_rspec_failure.rb" do
env = { 'SELENIUM_BROWSER' => @session.driver.options[:browser].to_s,
'LEGACY_FIREFOX' => (mode == :selenium_firefox ? 'TRUE' : nil) }
system(env, 'rspec spec/fixtures/selenium_driver_rspec_failure.rb', out: File::NULL, err: File::NULL)
system(@env, 'rspec spec/fixtures/selenium_driver_rspec_failure.rb', out: File::NULL, err: File::NULL)
expect($?.exitstatus).to eq(1)
end
it "should have return code 0 when running selenium_driver_rspec_success.rb" do
env = { 'SELENIUM_BROWSER' => @session.driver.options[:browser].to_s,
'LEGACY_FIREFOX' => (mode == :selenium_firefox ? 'TRUE' : nil) }
system(env, 'rspec spec/fixtures/selenium_driver_rspec_success.rb', out: File::NULL, err: File::NULL)
system(@env, 'rspec spec/fixtures/selenium_driver_rspec_success.rb', out: File::NULL, err: File::NULL)
expect($?.exitstatus).to eq(0)
end
end