pageify 0.3.1 → 0.3.2

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: 70014ada021ad89caf24800509b30d93d2b9eb15
4
- data.tar.gz: c3ab2804c9063d421266144d3904412d7d21e00d
3
+ metadata.gz: 0afe78427287d4e566a9f2f95d762a857886d125
4
+ data.tar.gz: a814cbde53f08beb62446c1110520f5b5baffddb
5
5
  SHA512:
6
- metadata.gz: a84726b1143b1b46d440e9913213e497d6d44bcd98432dc15c9c869e629f297b67047701e62b3b306197615eaaee9fa8bd9c2cd70c86ce47bd0f92b1b524acd3
7
- data.tar.gz: 30fc8a7ae4a2580c3ad28f8a4907ffd5a3d4750726b7cee18c1f3d3c05ee6c8f110cc06447f2d01039cdf93bb22bffcdad666f57acd54e4e9f28aca0a506edca
6
+ metadata.gz: 7cfa96740acfaec3c574be8ac5000f49d1bd690341b03971438685f46153f8320bd5d28898a5f5a1812560958be4ea0f2e6921b9515bf5b249a8075de90027f9
7
+ data.tar.gz: c5ccb14bdfbd8c31c8465a53f7de5f9aace6150c9d45e2fd89c09556c34f17f318411cccb8f89bb0a34d90ea51934637617e28bb965e00eb988e9740f506f72c
@@ -5,7 +5,11 @@ class PageObject
5
5
  child = PageObject.create(raw_row)
6
6
  child.parent = self
7
7
  define_singleton_method(child.name) do |*arguments|
8
- child_selector = (child.selector % arguments).strip_quotes.strip
8
+ unless arguments.eql? []
9
+ child_selector = (child.selector % arguments).strip_quotes.strip
10
+ else
11
+ child_selector = (child.selector % '').strip_quotes.strip
12
+ end
9
13
  if child_selector.start_with? "&"
10
14
  $selector += child_selector.gsub(/^&/, "")
11
15
  else
data/spec/sample_spec.rb CHANGED
@@ -25,6 +25,10 @@ describe Pageify do
25
25
  @page.root.complex.arg(1).p.should == ".root .complex .arg:nth-of-type(1)"
26
26
  end
27
27
 
28
+ it "should ignore arguments if not present" do
29
+ @page.root.complex.arg.p.should == ".root .complex .arg:nth-of-type()"
30
+ end
31
+
28
32
  it "should check pages nested inside arguments" do
29
33
  @page.root.complex.arg(1).arg_nested.p.should == ".root .complex .arg:nth-of-type(1) .arg_nested"
30
34
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pageify
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Deepak
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-04 00:00:00.000000000 Z
11
+ date: 2014-06-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec