This commit is contained in:
James Mason 2017-11-03 17:51:15 +00:00 • committed by GitHub
commit 03aed464c9
4 changed files with 21 additions and 4 deletions

View file

@ -1,4 +1,4 @@
sudo: required
sudo: false
dist: trusty
language: ruby
cache: bundler
@ -26,7 +26,8 @@ before_script:
script:
- "./travis_script.sh $TEST_SUITE"
env:
- TEST_SUITE=rspec
- TEST_SUITE=linters
- TEST_SUITE=rspec
- TEST_SUITE=features
matrix:
fast_finish: true

View file

@ -11,6 +11,13 @@ Osem::Application.configure do
config.serve_static_files = true
config.static_cache_control = 'public, max-age=3600'
# Use memory store for assets cache intest to avoid caching to tmp/assets,
# because it causes hiding of deprecation messages in stylesheets, and
# reduces performance.
config.assets.configure do |env|
env.cache = ActiveSupport::Cache.lookup_store(:memory_store)
end
# Do not eager load code on boot.
config.eager_load = false

View file

@ -59,7 +59,13 @@ RSpec.configure do |config|
Capybara.javascript_driver = :poltergeist
Capybara.register_driver :poltergeist do |app|
Capybara::Poltergeist::Driver.new(app, phantomjs: Phantomjs.path, js_errors: false, window_size: [1920, 1080])
Capybara::Poltergeist::Driver.new(
app,
phantomjs: Phantomjs.path,
js_errors: false,
window_size: [1920, 1080],
url_whitelist: ['http://www.example.com']
)
end
# Includes helpers and connect them to specific types of tests

View file

@ -17,7 +17,10 @@ case $TEST_SUITE in
bundle exec haml-lint app/views
;;
rspec)
bundle exec rspec --color --format documentation
bundle exec rspec --color --format documentation --exclude-pattern "spec/features/*_spec.rb"
;;
features)
bundle exec rspec --color --format documentation spec/features/*_spec.rb
;;
*)
bundle exec rubocop -Dc .rubocop.yml