Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ rvm:
- 1.8.7
- 1.9.3

gemfile:
- gemfiles/3.0.gemfile
- gemfiles/3.1.gemfile
- gemfiles/3.2.gemfile
before_script:
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
- bundle exec rake appraisal:install
- bundle exec rake test:integration:selenium:install

script: "bundle exec rake test:units"
script: "bundle exec rake test:integration:units test:integration:selenium"
25 changes: 23 additions & 2 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,24 @@ namespace :test do
task :units do
system("bundle exec rake -s appraisal test:units")
end


namespace :selenium do
task :install do
for_each_directory_of('test/test_apps/[0-9]*/**/Gemfile') do |directory|
gemfile_path = File.join(directory, 'Gemfile')
appraisal = Appraisal::Appraisal.new("name", File.join(directory, 'Gemfile'))

def appraisal.gemfile_path
@gemfile_path
end

appraisal.instance_variable_set(:@gemfile_path, gemfile_path)

appraisal.install
end
end
end

desc "Run selenium tests on all apps."
task :selenium do
if app_version = ENV['APP_VERSION']
Expand All @@ -34,9 +51,13 @@ end

def run_test_in(directory, *tasks)
env = "TEST=../../#{ENV['TEST']} " if ENV['TEST']
run_in(directory, "#{env} bundle exec rake #{tasks.join(' ')}")
end

def run_in(directory, command)
puts '', directory, ''
with_pruned_env('BUNDLE_GEMFILE') do
system("cd #{directory} && #{env} bundle exec rake #{tasks.join(' ')}")
system("cd #{directory} && #{command}")
end
end

Expand Down
1 change: 0 additions & 1 deletion test/test_apps/3.0/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,4 @@ gem 'jquery-rails'
group :development do
gem 'ae_page_objects', :path => '../../..'
gem "mocha", "0.13.3", :require => false
gem "rcov", ">= 0"
end
2 changes: 0 additions & 2 deletions test/test_apps/3.0/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ GEM
rdoc (~> 3.4)
thor (~> 0.14.4)
rake (10.0.4)
rcov (1.0.0)
rdoc (3.12.2)
json (~> 1.4)
rubyzip (0.9.9)
Expand All @@ -114,5 +113,4 @@ DEPENDENCIES
jquery-rails
mocha (= 0.13.3)
rails (= 3.0.20)
rcov
sqlite3
1 change: 0 additions & 1 deletion test/test_apps/3.1/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,4 @@ gem 'jquery-rails'
group :development do
gem 'ae_page_objects', :path => '../../..'
gem "mocha", "0.13.3", :require => false
gem "rcov", ">= 0"
end
2 changes: 0 additions & 2 deletions test/test_apps/3.1/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ GEM
rdoc (~> 3.4)
thor (~> 0.14.6)
rake (10.0.4)
rcov (1.0.0)
rdoc (3.12.2)
json (~> 1.4)
rubyzip (0.9.9)
Expand Down Expand Up @@ -124,5 +123,4 @@ DEPENDENCIES
jquery-rails
mocha (= 0.13.3)
rails (= 3.1.12)
rcov
sqlite3
1 change: 0 additions & 1 deletion test/test_apps/3.2/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,4 @@ gem 'jquery-rails'
group :development do
gem 'ae_page_objects', :path => '../../..'
gem "mocha", "0.13.3", :require => false
gem "rcov", ">= 0"
end
2 changes: 0 additions & 2 deletions test/test_apps/3.2/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ GEM
rdoc (~> 3.4)
thor (>= 0.14.6, < 2.0)
rake (10.0.4)
rcov (1.0.0)
rdoc (3.12.2)
json (~> 1.4)
rubyzip (0.9.9)
Expand Down Expand Up @@ -123,5 +122,4 @@ DEPENDENCIES
jquery-rails
mocha (= 0.13.3)
rails (= 3.2.13)
rcov
sqlite3