test-helpers 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 920ee3129c40ca0492f68e11da238baec30bbf31
4
- data.tar.gz: a400e5ad90296ae24fc56bbc68fb8ed731a2a9f7
3
+ metadata.gz: 737258463f16df120cd872f36c0466b389ef46a1
4
+ data.tar.gz: db1a32a18d91af7f1ff88d0a5ca8a6198191860f
5
5
  SHA512:
6
- metadata.gz: f72f54b9124a18cbe9fa1900d698df7534f7bd8eb773ca0889980e6f9a8900689d3e34b795c4e836fb741184665786bd073969b16c064c93b89942052d125e24
7
- data.tar.gz: a3aca5aecf82b8a105a557ca79148da938ffa4b6e5d551bc539a37ef60e6841f60cdb80a1bb2b5b5e4e0bbe822b3b5f17b73ecf61ea5c7b82e97949444c48680
6
+ metadata.gz: 5fbd2c055037b712da3d64a7c8adff16a564915ca77cd6d71f532ebae9da1f9e48707f367a4746404fc6810ebdbbdfc747f4fc5d8aec1d4e47a27dc1996cf799
7
+ data.tar.gz: c1c69ac59fdbd9a1714102e8169fcca1e8a36326fe1c21cee4d23491f3bfb00f89f289a03c0b7ff84a9c43997789a3808933e0fd38b401fa812e713b3cd15b0c
@@ -13,12 +13,12 @@ module TestHelpers
13
13
  end
14
14
 
15
15
  class Configuration
16
- attr_accessor :wait_timeout, :wait_interval, :default_error
16
+ attr_accessor :wait_timeout, :wait_interval, :error_message
17
17
 
18
18
  def initialize
19
19
  @wait_timeout = 5.0
20
20
  @wait_interval = 0.1
21
- @default_error = TimeoutError.new('Timed out waiting for block')
21
+ @error_message = 'Timed out waiting for block'
22
22
  end
23
23
  end
24
24
 
@@ -44,7 +44,7 @@ module TestHelpers
44
44
  return unless block_given?
45
45
  timeout = Float(options[:timeout] || TestHelpers::Wait.configuration.wait_timeout)
46
46
  interval = Float(options[:interval] || TestHelpers::Wait.configuration.wait_interval)
47
- error = options[:error] || TestHelpers::Wait.configuration.default_error
47
+ error_message = options[:error_message] || TestHelpers::Wait.configuration.error_message
48
48
  end_time = ::Time.now + timeout
49
49
  until ::Time.now > end_time
50
50
  begin
@@ -56,7 +56,7 @@ module TestHelpers
56
56
  end
57
57
  result = yield
58
58
  return result if result
59
- raise error
59
+ raise TimeoutError.new(error_message)
60
60
  end
61
61
 
62
62
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: test-helpers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Umair Chagani, Manheim