watirsplash 2.3.0 → 2.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +6 -6
- data/lib/watirsplash/page/base.rb +3 -4
- data/lib/watirsplash/version.rb +2 -2
- data/spec/page_spec.rb +22 -0
- metadata +5 -5
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
watirsplash (2.
|
4
|
+
watirsplash (2.3.1)
|
5
5
|
bundler (~> 1.0)
|
6
6
|
rake (= 0.8.7)
|
7
7
|
require_all
|
@@ -14,13 +14,13 @@ GEM
|
|
14
14
|
builder (3.0.0)
|
15
15
|
childprocess (0.2.2)
|
16
16
|
ffi (~> 1.0.6)
|
17
|
-
commonwatir (2.0.
|
17
|
+
commonwatir (2.0.2)
|
18
18
|
user-choices
|
19
19
|
diff-lcs (1.1.2)
|
20
20
|
ffi (1.0.9-x86-mingw32)
|
21
21
|
firewatir (1.9.4)
|
22
22
|
commonwatir (>= 1.9.2)
|
23
|
-
hoe (2.12.
|
23
|
+
hoe (2.12.3)
|
24
24
|
rake (~> 0.8)
|
25
25
|
json_pure (1.5.4)
|
26
26
|
spruz (~> 0.2.8)
|
@@ -56,8 +56,8 @@ GEM
|
|
56
56
|
builder (>= 2.1.2)
|
57
57
|
s4t-utils (>= 1.0.3)
|
58
58
|
xml-simple (>= 1.0.11)
|
59
|
-
watir (2.0.
|
60
|
-
commonwatir (= 2.0.
|
59
|
+
watir (2.0.2)
|
60
|
+
commonwatir (= 2.0.2)
|
61
61
|
ffi (~> 1.0)
|
62
62
|
nokogiri
|
63
63
|
rautomation (~> 0.6.3)
|
@@ -86,7 +86,7 @@ DEPENDENCIES
|
|
86
86
|
firewatir (>= 1.9.4)
|
87
87
|
rspec (~> 2.6.0)
|
88
88
|
spork (~> 0.9.0.rc9)
|
89
|
-
watir (= 2.0.
|
89
|
+
watir (= 2.0.2)
|
90
90
|
watir-webdriver (~> 0.3.3)
|
91
91
|
watirsplash!
|
92
92
|
win32screenshot (~> 1.0.5)
|
@@ -14,11 +14,10 @@ module WatirSplash
|
|
14
14
|
|
15
15
|
def initialize(browser=nil)
|
16
16
|
if browser
|
17
|
-
@browser =
|
17
|
+
@browser = browser
|
18
18
|
else
|
19
|
-
|
20
|
-
|
21
|
-
WatirSplash::Browser.new
|
19
|
+
reuse_current = WatirSplash::Browser.current && WatirSplash::Browser.current.exists?
|
20
|
+
@browser = reuse_current ? WatirSplash::Browser.current : (WatirSplash::Browser.current = WatirSplash::Browser.new)
|
22
21
|
@browser.goto @@url
|
23
22
|
end
|
24
23
|
end
|
data/lib/watirsplash/version.rb
CHANGED
data/spec/page_spec.rb
CHANGED
@@ -36,6 +36,28 @@ describe WatirSplash::Page::Base do
|
|
36
36
|
page_browser.should == browser
|
37
37
|
page_browser.url.should =~ %r{google.com}
|
38
38
|
end
|
39
|
+
|
40
|
+
it "reuses the current browser" do
|
41
|
+
browser = WatirSplash::Browser.new
|
42
|
+
|
43
|
+
page = DummyPage.new
|
44
|
+
page.instance_variable_get(:@browser).should == browser
|
45
|
+
|
46
|
+
WatirSplash::Browser.current.should == browser
|
47
|
+
end
|
48
|
+
|
49
|
+
it "opens up a new browser if current browser has been closed" do
|
50
|
+
browser = WatirSplash::Browser.new
|
51
|
+
browser.close
|
52
|
+
browser.should_not exist
|
53
|
+
|
54
|
+
page = DummyPage.new
|
55
|
+
page_browser = page.instance_variable_get(:@browser)
|
56
|
+
page_browser.should exist
|
57
|
+
page_browser.should_not == browser
|
58
|
+
|
59
|
+
WatirSplash::Browser.current.should == page_browser
|
60
|
+
end
|
39
61
|
end
|
40
62
|
|
41
63
|
context "#modify" do
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: watirsplash
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 1
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 2
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 2.3.
|
9
|
+
- 1
|
10
|
+
version: 2.3.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Jarmo Pertman
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-09-
|
18
|
+
date: 2011-09-11 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: rake
|
@@ -173,7 +173,7 @@ rubyforge_project:
|
|
173
173
|
rubygems_version: 1.8.4
|
174
174
|
signing_key:
|
175
175
|
specification_version: 3
|
176
|
-
summary: watirsplash 2.3.
|
176
|
+
summary: watirsplash 2.3.1
|
177
177
|
test_files:
|
178
178
|
- spec/browser_spec.rb
|
179
179
|
- spec/page_spec.rb
|