calabash-cucumber 0.9.106 → 0.9.107

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- calabash-cucumber (0.9.106)
4
+ calabash-cucumber (0.9.107)
5
5
  CFPropertyList
6
6
  bundler (~> 1.1)
7
7
  cucumber
@@ -1,6 +1,6 @@
1
1
  module Calabash
2
2
  module Cucumber
3
- VERSION = "0.9.106"
4
- FRAMEWORK_VERSION = "0.9.103"
3
+ VERSION = "0.9.107"
4
+ FRAMEWORK_VERSION = "0.9.107"
5
5
  end
6
6
  end
@@ -37,9 +37,7 @@ module Calabash
37
37
 
38
38
  begin
39
39
  Timeout::timeout(timeout,WaitError) do
40
- until block.call
41
- sleep(retry_frequency)
42
- end
40
+ sleep(retry_frequency) until yield
43
41
  end
44
42
  sleep(post_timeout) if post_timeout > 0
45
43
  rescue WaitError => e
@@ -49,6 +47,18 @@ module Calabash
49
47
  end
50
48
  end
51
49
 
50
+ def wait_poll(opts, &block)
51
+ test = opts[:until]
52
+ wait_for(opts) do
53
+ if test.call()
54
+ true
55
+ else
56
+ yield
57
+ false
58
+ end
59
+ end
60
+ end
61
+
52
62
  #options for wait_for apply
53
63
  def wait_for_elements_exist(elements_arr, options={})
54
64
  options[:timeout_message] = options[:timeout_message] || "Timeout waiting for elements: #{elements_arr.join(",")}"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: calabash-cucumber
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.106
4
+ version: 0.9.107
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-09-27 00:00:00.000000000 Z
12
+ date: 2012-10-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: cucumber