Skip to content

Commit

Permalink
Merge pull request #381 from marcmillien/fix-tests
Browse files Browse the repository at this point in the history
Fix tests
  • Loading branch information
sj26 authored Jun 9, 2018
2 parents 4c08981 + a027430 commit 605e94f
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 9 deletions.
15 changes: 11 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
sudo: false
language: ruby
rvm:
- 1.9.3
- 2.0.0
- 2.1.5
- 2.2.0
- 2.2
- 2.3
- 2.4
- 2.5
addons:
chrome: stable
apt:
packages:
- chromium-chromedriver
before_script:
- ln -s /usr/lib/chromium-browser/chromedriver ~/bin/chromedriver
6 changes: 3 additions & 3 deletions mailcatcher.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Gem::Specification.new do |s|
s.executables = ["mailcatcher", "catchmail"]
s.extra_rdoc_files = ["README.md", "LICENSE"]

s.required_ruby_version = ">= 1.9.3"
s.required_ruby_version = ">= 2.0.0"

s.add_dependency "eventmachine", "1.0.9.1"
s.add_dependency "mail", "~> 2.3"
Expand All @@ -39,12 +39,12 @@ Gem::Specification.new do |s|
s.add_dependency "skinny", "~> 0.2.3"

s.add_development_dependency "coffee-script"
s.add_development_dependency "compass"
s.add_development_dependency "compass", "~> 1.0.3"
s.add_development_dependency "minitest", "~> 5.0"
s.add_development_dependency "rake"
s.add_development_dependency "rdoc"
s.add_development_dependency "sass"
s.add_development_dependency "selenium-webdriver"
s.add_development_dependency "selenium-webdriver", "~> 3.7"
s.add_development_dependency "sprockets"
s.add_development_dependency "sprockets-sass"
s.add_development_dependency "sprockets-helpers"
Expand Down
13 changes: 11 additions & 2 deletions spec/acceptance_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,19 @@ def deliver_example(name, options={})
end

def selenium
@selenium ||= Selenium::WebDriver.for(:phantomjs)
@selenium ||=
begin
options = Selenium::WebDriver::Chrome::Options.new
options.headless!
options.add_argument "no-sandbox" if ENV["TRAVIS"]

Selenium::WebDriver.for(:chrome, options: options)
end
end

before { selenium.navigate.to("http://127.0.0.1:#{HTTP_PORT}") }
before do
selenium.navigate.to("http://127.0.0.1:#{HTTP_PORT}")
end

def messages_element
selenium.find_element(:id, "messages")
Expand Down

0 comments on commit 605e94f

Please sign in to comment.