rwebspec 3.1.3 → 3.1.4

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,6 +1,9 @@
1
1
  CHANGELOG
2
2
  =========
3
3
 
4
+ 3.1.4
5
+ - rename try_until to try_for (previous syntax still works)
6
+
4
7
  3.1.3
5
8
  - changed rows => trs, cells => tds with Watir 3
6
9
 
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.3"
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
 
@@ -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
- # try_until { click_link('waiting')}
17
- # try_until(10, 2) { click_button('Search' } # try to click the 'Search' button upto 10 seconds, try every 2 seconds
18
- # try_until { click_button('Search' }
19
- def try_until(timeout = $testwise_polling_timeout, polling_interval = $testwise_polling_interval || 1, &block)
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 try_until
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
@@ -16,7 +16,7 @@ end
16
16
  require 'rspec'
17
17
 
18
18
  unless defined? RWEBSPEC_VERSION
19
- RWEBSPEC_VERSION = RWEBUNIT_VERSION = "3.1.2"
19
+ RWEBSPEC_VERSION = RWEBUNIT_VERSION = "3.1.4"
20
20
  end
21
21
 
22
22
  $testwise_polling_interval = 1 # seconds
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 3
7
7
  - 1
8
- - 3
9
- version: 3.1.3
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-20 00:00:00 +10:00
17
+ date: 2012-06-22 00:00:00 +10:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency