watirsplash 2.0.0 → 2.0.1.rc1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- watirsplash (2.0.0)
4
+ watirsplash (2.0.1.rc1)
5
5
  bundler (~> 1.0)
6
6
  rake (= 0.8.7)
7
7
  require_all
@@ -1,6 +1,15 @@
1
1
  require 'rspec/core/formatters/html_formatter'
2
2
  require 'rspec/core/formatters/snippet_extractor'
3
3
 
4
+ # make sure that UnkownObjectException constant exists
5
+ module Watir
6
+ module Exception
7
+ class WatirException < RuntimeError
8
+ end
9
+ class UnknownObjectException < WatirException; end
10
+ end
11
+ end
12
+
4
13
  # patch for https://github.com/rspec/rspec-core/issues/#issue/214
5
14
  module RSpec
6
15
  module Core
@@ -147,9 +156,21 @@ RSpec::Matchers.constants.each do |const|
147
156
 
148
157
  def matches?(actual)
149
158
  if @within_timeout
150
- Watir::Wait.until(@within_timeout) {__matches?(actual)} rescue false
159
+ Watir::Wait.until(@within_timeout) do
160
+ begin
161
+ __matches?(actual)
162
+ rescue Watir::Exception::UnknownObjectException
163
+ false
164
+ end
165
+ end rescue false
151
166
  elsif @during_timeout
152
- Watir::Wait.while(@during_timeout) {__matches?(actual)} rescue true
167
+ Watir::Wait.while(@during_timeout) do
168
+ begin
169
+ __matches?(actual)
170
+ rescue Watir::Exception::UnknownObjectException
171
+ false
172
+ end
173
+ end rescue true
153
174
  else
154
175
  __matches?(actual)
155
176
  end
@@ -161,9 +182,21 @@ RSpec::Matchers.constants.each do |const|
161
182
 
162
183
  def does_not_match?(actual)
163
184
  if @within_timeout
164
- Watir::Wait.until(@within_timeout) {__does_not_match?(actual)} rescue false
185
+ Watir::Wait.until(@within_timeout) do
186
+ begin
187
+ __does_not_match?(actual)
188
+ rescue Watir::Exception::UnknownObjectException
189
+ false
190
+ end
191
+ end rescue false
165
192
  elsif @during_timeout
166
- Watir::Wait.while(@during_timeout) {__does_not_match?(actual)} rescue true
193
+ Watir::Wait.while(@during_timeout) do
194
+ begin
195
+ __does_not_match?(actual)
196
+ rescue Watir::Exception::UnknownObjectException
197
+ false
198
+ end
199
+ end rescue true
167
200
  else
168
201
  __does_not_match?(actual)
169
202
  end
@@ -171,9 +204,21 @@ RSpec::Matchers.constants.each do |const|
171
204
  elsif inst_methods.include? :matches?
172
205
  def does_not_match?(actual)
173
206
  if @within_timeout
174
- Watir::Wait.until(@within_timeout) {!__matches?(actual)} rescue false
207
+ Watir::Wait.until(@within_timeout) do
208
+ begin
209
+ !__matches?(actual)
210
+ rescue Watir::Exception::UnknownObjectException
211
+ false
212
+ end
213
+ end rescue false
175
214
  elsif @during_timeout
176
- Watir::Wait.while(@during_timeout) {!__matches?(actual)} rescue true
215
+ Watir::Wait.while(@during_timeout) do
216
+ begin
217
+ !__matches?(actual)
218
+ rescue Watir::Exception::UnknownObjectException
219
+ false
220
+ end
221
+ end rescue true
177
222
  else
178
223
  !__matches?(actual)
179
224
  end
@@ -1,6 +1,6 @@
1
1
  module WatirSplash
2
2
  module Version
3
- WATIRSPLASH = "2.0.0"
3
+ WATIRSPLASH = "2.0.1.rc1"
4
4
 
5
5
  # possible runtime dependencies
6
6
  WATIR = "1.9.1"
@@ -81,7 +81,6 @@ describe "RSpec patches" do
81
81
 
82
82
  context "#during" do
83
83
  it "will pass upon timeout" do
84
- require "ruby-debug"; debugger;
85
84
  t = Time.now
86
85
  true.should be_true.during(0.5)
87
86
  (Time.now - t).should be >= 0.5
metadata CHANGED
@@ -1,13 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: watirsplash
3
3
  version: !ruby/object:Gem::Version
4
- hash: 15
5
- prerelease:
4
+ hash: 15424095
5
+ prerelease: 6
6
6
  segments:
7
7
  - 2
8
8
  - 0
9
- - 0
10
- version: 2.0.0
9
+ - 1
10
+ - rc
11
+ - 1
12
+ version: 2.0.1.rc1
11
13
  platform: ruby
12
14
  authors:
13
15
  - Jarmo Pertman
@@ -162,19 +164,21 @@ required_ruby_version: !ruby/object:Gem::Requirement
162
164
  required_rubygems_version: !ruby/object:Gem::Requirement
163
165
  none: false
164
166
  requirements:
165
- - - ">="
167
+ - - ">"
166
168
  - !ruby/object:Gem::Version
167
- hash: 3
169
+ hash: 25
168
170
  segments:
169
- - 0
170
- version: "0"
171
+ - 1
172
+ - 3
173
+ - 1
174
+ version: 1.3.1
171
175
  requirements: []
172
176
 
173
177
  rubyforge_project:
174
178
  rubygems_version: 1.8.4
175
179
  signing_key:
176
180
  specification_version: 3
177
- summary: watirsplash 2.0.0
181
+ summary: watirsplash 2.0.1.rc1
178
182
  test_files:
179
183
  - spec/browser_spec.rb
180
184
  - spec/environment.rb