Mailinglist Archive: yast-commit (1914 mails)

< Previous Next >
[yast-commit] <web-client> basesystem : configure test-unit gem only in test mode
  • From: Josef Reidinger <jreidinger@xxxxxxx>
  • Date: Mon, 24 Aug 2009 15:37:54 +0200
  • Message-id: <E1Mlexa-0003d9-RJ@xxxxxxxxxxxxxxxx>
ref: refs/heads/basesystem
commit 0addd7acc144d087b579aa8d773ca73e507a3a08
Author: Ladislav Slezak <lslezak@xxxxxxxxxx>
Date: Wed Aug 19 18:43:47 2009 +0200

configure test-unit gem only in test mode

automatic plugin reloading for some reason triggers testsuite run
when scripts/server is finished
---
webclient/config/environment.rb | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/webclient/config/environment.rb b/webclient/config/environment.rb
index 882beb0..b9c296e 100644
--- a/webclient/config/environment.rb
+++ b/webclient/config/environment.rb
@@ -21,7 +21,10 @@ init = Rails::Initializer.run do |config|
# config.frameworks -= [ :active_record, :active_resource, :action_mailer ]

# configure load path for test unit, needed for mocha >= 0.9.6 and test-unit
= 2.0.0
- config.gem 'test-unit', :lib => 'test/unit'
+ config.gem 'test-unit', :lib => 'test/unit' if ENV['RAILS_ENV'] == 'test' or
+ # FIXME: 'rake test' in plugins sets test mode too late, script/server
sets both variables
+ # to 'development' so this should not be set in real development mode
+ (RAILS_ENV == 'development' and ENV['RAILS_ENV'].nil?)

# Specify gems that this application depends on.
# They can then be installed with "rake gems:install" on new installations.
--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages