wildcard_finders 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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a86602a53c25883d36e6a431727278cd9130aa96
4
- data.tar.gz: 21bd97dd507e77bf35037e7bb6c5bf8abb746a45
3
+ metadata.gz: 124435736d6ec93e0da7c9da2c2abd2e2acd6c4a
4
+ data.tar.gz: b26976f9b75f95cc315c8aa931e70208c03aa9f8
5
5
  SHA512:
6
- metadata.gz: 90eeb41f97178af3d68cfbbd3d2ff7e9e6e0eb8c6a74586bd5e698d1d10032537f7b90947ef930917909f2b4a9e8920f78d799640b96e0ba70b5f8eae4b7cafb
7
- data.tar.gz: 0206955180e98f11289be3632ccc22edcc4d4ab1c53e8a9196c8bdb22888e8d408a1f80dcf77a3c8c4838de94162b8e51e28e9c3d1d0238a5aa16fe7d101d4cb
6
+ metadata.gz: 7a54f4bb598fdb452d6a310f0e426de10fd962c45af25ce1178709f85a7caac37e814f3b1550f9eaa26985f0e7e7cde9424233898980b9b9b15fa04574a35740
7
+ data.tar.gz: b81159f03f229a32b21c1afc2cefae51828d17e3712158946359c6e6fc6d8e075f49d5c32a6e6ea3a3ccbe6c98d2a4be6489dc6ad70de615e5899d7d6859a72a
data/.ruby-gemset ADDED
@@ -0,0 +1 @@
1
+ wildcard_finders
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ default
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 0.0.4
2
+ * FIX
3
+ * bug of find_exactly raise ElementNotFound error and have_no_xxx_like fail
4
+
1
5
  # 0.0.3
2
6
  * ADD
3
7
  * use xpath when matcher can be converted
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.3
1
+ 0.0.4
@@ -37,7 +37,11 @@ module WildcardFinders
37
37
  x.descendant(tag.to_sym)[attr_matcher.inject(&:&)]
38
38
  end
39
39
 
40
- find(:xpath, xpath)
40
+ begin
41
+ find(:xpath, xpath)
42
+ rescue Capybara::ElementNotFound
43
+ nil
44
+ end
41
45
  end
42
46
 
43
47
  def self.method_added(name)
@@ -61,5 +61,19 @@ describe WildcardFinders::Finders do
61
61
  end
62
62
  end
63
63
 
64
+ context "when not matched" do
65
+ where(:attr, :value) do
66
+ [ [ :href, /not_matched/ ],
67
+ [ :href, "not_matched" ],
68
+ ]
69
+ end
70
+
71
+ with_them do
72
+ it "returns nil" do
73
+ visit "/a"
74
+ page.find_anchor_like(attr => value).should be_nil
75
+ end
76
+ end
77
+ end
64
78
  end
65
79
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wildcard_finders
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - okitan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-04-15 00:00:00.000000000 Z
11
+ date: 2013-05-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capybara
@@ -144,7 +144,8 @@ extensions: []
144
144
  extra_rdoc_files: []
145
145
  files:
146
146
  - .gitignore
147
- - .rvmrc
147
+ - .ruby-gemset
148
+ - .ruby-version
148
149
  - .travis.yml
149
150
  - CHANGELOG.md
150
151
  - Gemfile
data/.rvmrc DELETED
@@ -1 +0,0 @@
1
- rvm gemset use wildcard_finders --create