wist 0.0.11 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/wist.rb +12 -0
- data/test/test0.html +5 -0
- data/test/tests/wist_test.rb +12 -0
- data/wist.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 23d02d137eaac3aeba10a8e1bd5d20cc489d831c
|
4
|
+
data.tar.gz: 429cf88b833112dd1b72eed4a99882db0da8cfc8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3d09afc40a00e8bfb67665535a0f319c8faf288bee45176cf5a9712638428e5a7bf8684dc2e8fc047422c6ba62cc93361a3409caa0de08bc1136c3cbba1d03e1
|
7
|
+
data.tar.gz: b10041c36ade40d479bb428115f0a78efac7d096f88503fae74292ae8ba559986bbeabea8faf17ce86fd6206d05b1f403aa31d09845a603358ee1acd61294dc9
|
data/Gemfile.lock
CHANGED
data/lib/wist.rb
CHANGED
@@ -132,4 +132,16 @@ module Wist
|
|
132
132
|
|
133
133
|
raise "visit #{url} failed" unless status == 'success'
|
134
134
|
end
|
135
|
+
|
136
|
+
def assert_text(text, el)
|
137
|
+
assert_equal(text, el.text)
|
138
|
+
end
|
139
|
+
|
140
|
+
def assert_text_include(text, el)
|
141
|
+
assert_equal(true, el.text.include?(text))
|
142
|
+
end
|
143
|
+
|
144
|
+
def parent(el)
|
145
|
+
el.first(:xpath, './/..')
|
146
|
+
end
|
135
147
|
end
|
data/test/test0.html
CHANGED
data/test/tests/wist_test.rb
CHANGED
@@ -130,4 +130,16 @@ class WistTest < CapybaraTestCase
|
|
130
130
|
visit_with_retries("file://#{Dir.pwd}/test/test0.html")
|
131
131
|
verify_test_page(0)
|
132
132
|
end
|
133
|
+
|
134
|
+
def test_assert_text
|
135
|
+
assert_text('foo', find('#click_test'))
|
136
|
+
end
|
137
|
+
|
138
|
+
def test_assert_text_include
|
139
|
+
assert_text_include('fo', find('#click_test'))
|
140
|
+
end
|
141
|
+
|
142
|
+
def test_parent
|
143
|
+
assert_text('parent', parent(find('#test_parent')))
|
144
|
+
end
|
133
145
|
end
|
data/wist.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wist
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lihan Li
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-04-
|
11
|
+
date: 2013-04-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capybara
|