soup 1.0.12 → 1.0.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +1 -1
- data/lib/soup/snip.rb +1 -1
- data/test/snip_test.rb +16 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c2cdde42bcba5e8941e39c5357151f663583dcf5
|
4
|
+
data.tar.gz: 25aad47ac91728b5185dfa5ea44e1afdd1df58d0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 559c0a7caba3609db903f53e58e803049ad2a52f34ac6f2a268ca0ee7735c29bd07f7e88ef1bfd0e1f153cc0a5d169f2a35c2b0543cdcd9226c9d999c08be5fb
|
7
|
+
data.tar.gz: b080481909c140e1795ba68206d8fe04604a65ed34416cb382b9d7c3f23e50c9d7274ece2523da778c321e715cad209102a2aab482989b1602abd6125d05a1f4
|
data/Rakefile
CHANGED
data/lib/soup/snip.rb
CHANGED
data/test/snip_test.rb
CHANGED
@@ -35,4 +35,19 @@ context "A snip" do
|
|
35
35
|
assert_equal Soup::Snip.new({:name => 'test'}, nil), @soup['test']
|
36
36
|
end
|
37
37
|
end
|
38
|
-
|
38
|
+
|
39
|
+
context "respond_to?" do
|
40
|
+
should "be true when snip has given attribute" do
|
41
|
+
assert @snip.respond_to?(:name)
|
42
|
+
end
|
43
|
+
|
44
|
+
should "be false is snip doesn't have given attribute" do
|
45
|
+
assert !@snip.respond_to?(:blah)
|
46
|
+
end
|
47
|
+
|
48
|
+
should "allow comparison using symbols or strings" do
|
49
|
+
assert @snip.respond_to?(:name)
|
50
|
+
assert @snip.respond_to?('name')
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|