From 79bd92c71d66af94d38401fd78c5d72c880cdb55 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Sun, 4 Aug 2013 23:50:08 +0200 Subject: [PATCH] Moved to test against test env. --- config/environments/test.rb | 16 ++++++++++++---- script/local_browser_tests.sh | 14 ++++++++++++++ 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/config/environments/test.rb b/config/environments/test.rb index 1e81ce893..f3e3b8f66 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -11,19 +11,20 @@ Zammad::Application.configure do config.serve_static_assets = true config.static_cache_control = "public, max-age=3600" + config.assets.compress = false + config.assets.compile = true + config.assets.digest = true + # Log error messages when you accidentally call methods on nil config.whiny_nils = true # Show full error reports and disable caching config.consider_all_requests_local = true - config.action_controller.perform_caching = false + config.action_controller.perform_caching = true # Raise exceptions instead of rendering exception templates config.action_dispatch.show_exceptions = false - # Disable request forgery protection in test environment - config.action_controller.allow_forgery_protection = false - # Tell Action Mailer not to deliver emails to the real world. # The :test delivery method accumulates sent emails in the # ActionMailer::Base.deliveries array. @@ -34,4 +35,11 @@ Zammad::Application.configure do # Print deprecation notices to the stderr config.active_support.deprecation = :stderr + + # Disable request forgery protection in test environment + config.action_controller.allow_forgery_protection = false + + # autoload on + config.dependency_loading = true + end diff --git a/script/local_browser_tests.sh b/script/local_browser_tests.sh index 2a54c6fc6..80db77f1b 100755 --- a/script/local_browser_tests.sh +++ b/script/local_browser_tests.sh @@ -9,20 +9,34 @@ while true; do esac done +export RAILS_ENV=test + bundle install rm -rf tmp/cache/file_store +rm -f public/assets/*.css* +rm -f public/assets/*.js* + +#rake assets:precompile rake db:drop rake db:create rake db:migrate rake db:seed +thin stop +script/websocket-server.rb stop + thin start --threaded -d -p 4444 +script/websocket-server.rb start -d sleep 15 rake test:browser["BROWSER_URL=http://localhost:4444"] +script/websocket-server.rb stop thin stop +rm -f public/assets/*.css* +rm -f public/assets/*.js* +