test-page 0.0.3 → 0.0.4
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/lib/test/page.rb +2 -2
- data/lib/test/page/version.rb +1 -1
- data/spec/test/page_spec.rb +0 -9
- metadata +2 -2
data/lib/test/page.rb
CHANGED
@@ -127,9 +127,9 @@ module Test
|
|
127
127
|
# Create new {Page} object conveniently on page actions.
|
128
128
|
#
|
129
129
|
# @param [Page] Page page class to make an instance of
|
130
|
-
# @param [Object] Element optional element instance
|
130
|
+
# @param [Object] Element optional element instance to use as a container.
|
131
131
|
def redirect_to(page, element=nil)
|
132
|
-
page.new element
|
132
|
+
page.new element
|
133
133
|
end
|
134
134
|
|
135
135
|
# Proxies every method call not found on {Page} to element instance.
|
data/lib/test/page/version.rb
CHANGED
data/spec/test/page_spec.rb
CHANGED
@@ -145,15 +145,6 @@ describe Test::Page do
|
|
145
145
|
page.redirect_me.should be_an_instance_of(second_page)
|
146
146
|
end
|
147
147
|
|
148
|
-
it "reuses the existing page element" do
|
149
|
-
second_page = Class.new(Test::Page)
|
150
|
-
page_class.send(:define_method, :redirect_me) { redirect_to second_page }
|
151
|
-
page_class.browser = "foo"
|
152
|
-
page = page_class.new "provided element"
|
153
|
-
redirected_page = page.redirect_me
|
154
|
-
redirected_page.element.should == "provided element"
|
155
|
-
end
|
156
|
-
|
157
148
|
it "is possible to specify new element" do
|
158
149
|
second_page = Class.new(Test::Page)
|
159
150
|
page_class.send(:define_method, :redirect_me) { redirect_to second_page, "new element" }
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: test-page
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
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: 2013-01-
|
12
|
+
date: 2013-01-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|