Skip to content

Commit

Permalink
Allow integration tests to run on Travis
Browse files Browse the repository at this point in the history
- Use addons that do not require verification
- Add cucumber and travis tasks
  • Loading branch information
kmayer committed Oct 22, 2013
1 parent 9a29a97 commit 3b56e56
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 12 deletions.
5 changes: 5 additions & 0 deletions .travis.yml
@@ -1,5 +1,10 @@
language: ruby
bundler_args: --without development
script: "rake travis"
rvm:
- 1.9.2
- 1.9.3
- 2.0.0
env:
global:
- secure: dAxfEdg/7Cb/G9vkrn/ifdvycbXWtK2ey60JMepOxx9v3QyaqoSY3w5G0QB+4+uyOYmHwtif8tnK3Sa8jbBgqhAlXaxqxOT8WmQKYlhSgwWX4lQe4lUM5jkOkfNHRMRaQvCAn27gNAjdIRU7sb2cU/pm64eAFbU01TejJOM7Aow=
24 changes: 14 additions & 10 deletions Gemfile
Expand Up @@ -3,21 +3,25 @@ source 'https://rubygems.org'
# Specify dependencies in heroku_san.gemspec
gemspec

group :development do
gem 'rails', '>= 2'
gem 'rspec'
group :test do
gem 'aruba'
gem 'bundler', '~> 1.1'
gem 'cucumber'
gem 'godot'
gem 'rails', '>= 2'
gem 'rake'
gem 'bundler', '~> 1.1'
gem 'rspec'
end

group :development do
gem 'git-smart'
gem 'godot'
gem 'guard'
gem 'rb-inotify', :require => false
gem 'rb-fsevent', :require => false
gem 'rb-fchange', :require => false
gem 'terminal-notifier-guard'
gem 'guard-rspec'
gem 'guard-bundler'
gem 'guard-cucumber'
gem 'guard-rspec'
gem 'rb-fchange', :require => false
gem 'rb-fsevent', :require => false
gem 'rb-inotify', :require => false
gem 'terminal-notifier-guard'
gem 'travis', '~> 1.5.6'
end
17 changes: 17 additions & 0 deletions Rakefile
Expand Up @@ -3,6 +3,8 @@ require 'rubygems'
require 'bundler/setup'
require 'bundler/gem_tasks'
require 'rspec/core/rake_task'
require 'cucumber'
require 'cucumber/rake/task'

desc 'Default: run unit tests.'
task :default => :spec
Expand All @@ -11,3 +13,18 @@ desc "Run all specs"
RSpec::Core::RakeTask.new do |t|
t.pattern = 'spec/**/*_spec.rb'
end

namespace 'cucumber' do
Cucumber::Rake::Task.new(:remote) do |t|
t.profile = "remote"
end

Cucumber::Rake::Task.new(:default) do |t|
t.profile = "default"
end
end

desc "Run travis test suite"
task :travis => [:spec, 'cucumber:default', 'cucumber:remote']

# for app in `heroku apps | tail +2`; do heroku apps:destroy --app $app --confirm $app; done
5 changes: 3 additions & 2 deletions features/step_definitions/remote_steps.rb
Expand Up @@ -201,13 +201,14 @@ def run_clean(cmd)
test_app:
app: #{@app}
addons:
- scheduler:standard
- heroku-postgresql:dev
- pgbackups:plus
END_CONFIG

output = run_clean 'rake test_app heroku:addons'
# The output should show the new one ...
assert_partial_output "scheduler:standard", output
assert_partial_output "heroku-postgresql:dev", output
end

Then /^(?:heroku_san|issue \d+) (?:is green|has been fixed)$/ do
Expand Down

0 comments on commit 3b56e56

Please sign in to comment.