selenium_shots 0.2.3 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -71,13 +71,13 @@ class SeleniumShots < ActionController::IntegrationTest
|
|
71
71
|
end
|
72
72
|
|
73
73
|
def self.selenium_shot(description, &block)
|
74
|
-
@@description = description
|
75
74
|
@@group = (@group || "Default")
|
76
75
|
test_name = "test_#{description.gsub(/\s+/,'_')}".to_sym
|
77
76
|
defined = instance_method(test_name) rescue false
|
78
77
|
raise "#{test_name} is already defined in #{self}" if defined
|
79
78
|
if block_given?
|
80
79
|
define_method(test_name) do
|
80
|
+
@description = description
|
81
81
|
run_in_all_browsers do |browser|
|
82
82
|
instance_eval &block
|
83
83
|
end
|
@@ -90,10 +90,10 @@ class SeleniumShots < ActionController::IntegrationTest
|
|
90
90
|
end
|
91
91
|
|
92
92
|
def run_in_all_browsers(&block)
|
93
|
+
@error = nil
|
93
94
|
browsers = (@selected_browser || selected_browsers)
|
94
95
|
browsers.each do |browser_spec|
|
95
96
|
begin
|
96
|
-
@error = nil
|
97
97
|
run_browser(browser_spec, block)
|
98
98
|
rescue => error
|
99
99
|
@browser.close_current_browser_session if @browser
|
@@ -126,7 +126,7 @@ class SeleniumShots < ActionController::IntegrationTest
|
|
126
126
|
@error = error.message
|
127
127
|
ensure
|
128
128
|
save_test({:selenium_test_group_name => @@group, :selenium_test_name => @name,
|
129
|
-
:description =>
|
129
|
+
:description => @description}) if SeleniumConfig.mode == "remote"
|
130
130
|
@browser.close_current_browser_session
|
131
131
|
end
|
132
132
|
end
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 2
|
8
|
-
-
|
9
|
-
version: 0.2.
|
8
|
+
- 4
|
9
|
+
version: 0.2.4
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Kyle J. Ginavan
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-06-
|
18
|
+
date: 2010-06-22 00:00:00 -05:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|