ref: refs/heads/master
commit 0902ea294d4223536efff841105f636cd70cea37
Author: Duncan Mac-Vicar P
Date: Tue Jul 21 16:47:22 2009 +0200
local != global variables, if that is what this code assumes
---
webclient/lib/tasks/selenium.rake | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/webclient/lib/tasks/selenium.rake b/webclient/lib/tasks/selenium.rake
index ff15193..563978d 100644
--- a/webclient/lib/tasks/selenium.rake
+++ b/webclient/lib/tasks/selenium.rake
@@ -1,9 +1,11 @@
+$selenium_available = false
+
begin
require 'rubygems'
# try loading all selenium task definitions
require 'selenium/rake/tasks'
-
+ $selenium_available = true
# define selenium:rc:start task
Selenium::Rake::RemoteControlStartTask.new do |rc|
rc.port = 4444
@@ -21,7 +23,7 @@ begin
rc.timeout_in_seconds = 3 * 60
end
rescue LoadError
- selenium_missing = true
+ puts "Selenium not available"
end
namespace :test do
@@ -36,7 +38,7 @@ namespace :test do
# define test:ui task - start/shut down Selenium server component automatically
desc 'Run UI tests using Selenium testing framework'
- if selenium_missing
+ if not $selenium_available
task :ui do
$stderr.puts "ERROR: 'selenium-client' gem is missing, UI testing task (test:ui)"
$stderr.puts " cannot be started. Install 'selenium-client' Ruby gem first."
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org