diff --git a/.travis.yml b/.travis.yml index 8b06795..258e85a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,7 +6,15 @@ rvm: - 2.0 - 2.1 - rbx-2 +before_script: + - cp config/database.yml.travis config/database.yml + - bundle exec rake db:create db:migrate db:test:prepare + # GNU echo requires non-stardard option `-e' to interpret escapes sequences + - 'echo -e "test:\n secret_key_base: $(bundle exec rake secret)" > config/secrets.yml' + - mkdir -p data/sounds data/test/sounds +script: bundle exec rspec matrix: + fast_finish: true allow_failures: - rvm: ruby-head - rvm: rbx-2 diff --git a/config/database.yml.travis b/config/database.yml.travis new file mode 100644 index 0000000..d70c441 --- /dev/null +++ b/config/database.yml.travis @@ -0,0 +1,4 @@ +test: + adapter: postgresql + database: travis_ci_test + username: postgres diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 14fc638..935da66 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -11,7 +11,6 @@ Spork.prefork do config.infer_spec_type_from_file_location! config.mock_with :rspec config.use_transactional_fixtures = true - Rails.configuration.sounds_path = "#{Rails.root}/tmp/spec/data/sounds" config.after(:all) do `rm -f #{Rails.configuration.sounds_path}/*` end