watirsplash 2.0.0 → 2.0.1.rc1
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/Gemfile.lock +1 -1
- data/lib/watirsplash/rspec_patches.rb +51 -6
- data/lib/watirsplash/version.rb +1 -1
- data/spec/rspec_patches_spec.rb +0 -1
- metadata +13 -9
data/Gemfile.lock
CHANGED
|
@@ -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)
|
|
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)
|
|
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)
|
|
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)
|
|
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)
|
|
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)
|
|
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
|
data/lib/watirsplash/version.rb
CHANGED
data/spec/rspec_patches_spec.rb
CHANGED
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:
|
|
5
|
-
prerelease:
|
|
4
|
+
hash: 15424095
|
|
5
|
+
prerelease: 6
|
|
6
6
|
segments:
|
|
7
7
|
- 2
|
|
8
8
|
- 0
|
|
9
|
-
-
|
|
10
|
-
|
|
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:
|
|
169
|
+
hash: 25
|
|
168
170
|
segments:
|
|
169
|
-
-
|
|
170
|
-
|
|
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.
|
|
181
|
+
summary: watirsplash 2.0.1.rc1
|
|
178
182
|
test_files:
|
|
179
183
|
- spec/browser_spec.rb
|
|
180
184
|
- spec/environment.rb
|