rwebspec 3.1.3 → 3.1.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.
- data/CHANGELOG +3 -0
- data/Rakefile +1 -1
- data/lib/rwebspec/test_utils.rb +8 -6
- data/lib/rwebspec.rb +1 -1
- metadata +3 -3
data/CHANGELOG
CHANGED
data/Rakefile
CHANGED
@@ -71,7 +71,7 @@ end
|
|
71
71
|
spec = Gem::Specification.new do |s|
|
72
72
|
s.platform= Gem::Platform::RUBY
|
73
73
|
s.name = "rwebspec"
|
74
|
-
s.version = "3.1.
|
74
|
+
s.version = "3.1.4"
|
75
75
|
s.summary = "Web application functional specification in Ruby"
|
76
76
|
s.description = "Executable functional specification for web applications in RSpec syntax and Watir"
|
77
77
|
|
data/lib/rwebspec/test_utils.rb
CHANGED
@@ -13,10 +13,10 @@ module RWebSpec
|
|
13
13
|
# Try the operation up to specified timeout (in seconds), and sleep given interval (in seconds).
|
14
14
|
# Error will be ignored until timeout
|
15
15
|
# Example
|
16
|
-
#
|
17
|
-
#
|
18
|
-
#
|
19
|
-
def
|
16
|
+
# try_for { click_link('waiting')}
|
17
|
+
# try_for(10, 2) { click_button('Search' } # try to click the 'Search' button upto 10 seconds, try every 2 seconds
|
18
|
+
# try_for { click_button('Search' }
|
19
|
+
def try_for(timeout = $testwise_polling_timeout, polling_interval = $testwise_polling_interval || 1, &block)
|
20
20
|
start_time = Time.now
|
21
21
|
|
22
22
|
last_error = nil
|
@@ -35,8 +35,10 @@ module RWebSpec
|
|
35
35
|
raise "Timeout after #{duration.to_i} seconds."
|
36
36
|
end
|
37
37
|
|
38
|
-
alias try_upto
|
39
|
-
|
38
|
+
alias try_upto try_for
|
39
|
+
alias try_up_to try_for
|
40
|
+
alias try_until try_for
|
41
|
+
|
40
42
|
def try(timeout = $testwise_polling_timeout, polling_interval = $testwise_polling_interval || 1, &block)
|
41
43
|
puts "Warning: method 'try' is deprecated (won't support in RWebSpec 3), use try_until instead."
|
42
44
|
try_until(timeout, polling_interval) {
|
data/lib/rwebspec.rb
CHANGED
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 3
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
version: 3.1.
|
8
|
+
- 4
|
9
|
+
version: 3.1.4
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Zhimin Zhan
|
@@ -14,7 +14,7 @@ autorequire: rwebspec
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2012-06-
|
17
|
+
date: 2012-06-22 00:00:00 +10:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|