rspec-html-matchers 0.3.5 → 0.4.0
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/.gitignore +5 -2
- data/CHANGELOG.md +19 -1
- data/README.md +115 -84
- data/Rakefile +5 -6
- data/features/support/env.rb +1 -1
- data/lib/rspec-html-matchers.rb +112 -81
- data/rspec-html-matchers.gemspec +2 -1
- data/{assets → spec/assets}/form.html +0 -0
- data/{assets → spec/assets}/ordered_list.html +0 -0
- data/{assets → spec/assets}/paragraphs.html +0 -0
- data/spec/assets/quotes.html +15 -0
- data/{assets → spec/assets}/search_and_submit.html +0 -0
- data/{assets → spec/assets}/special.html +0 -0
- data/spec/matchers/form_matchers_spec.rb +3 -2
- data/spec/matchers/have_tag_spec.rb +223 -97
- data/spec/spec_helper.rb +21 -4
- metadata +36 -11
- data/assets/quotes.html +0 -26
- data/mikhalok.jpg +0 -0
- data/spec/support/helpers.rb +0 -11
data/spec/spec_helper.rb
CHANGED
@@ -8,10 +8,27 @@ end
|
|
8
8
|
|
9
9
|
require 'rspec-html-matchers'
|
10
10
|
|
11
|
-
|
12
|
-
|
13
|
-
|
11
|
+
SPEC_DIR = File.dirname(__FILE__)
|
12
|
+
|
13
|
+
module AssetHelpers
|
14
|
+
|
15
|
+
def asset name
|
16
|
+
let :rendered do
|
17
|
+
IO.read File.join(SPEC_DIR,"assets/#{name}.html")
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
end
|
22
|
+
|
23
|
+
module CustomHelpers
|
24
|
+
|
25
|
+
def raise_spec_error msg
|
26
|
+
raise_error RSpec::Expectations::ExpectationNotMetError, msg
|
27
|
+
end
|
28
|
+
|
29
|
+
end
|
14
30
|
|
15
31
|
RSpec.configure do |config|
|
16
|
-
config.
|
32
|
+
config.extend AssetHelpers
|
33
|
+
config.include CustomHelpers
|
17
34
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rspec-html-matchers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
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: 2012-
|
12
|
+
date: 2012-11-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
@@ -123,6 +123,22 @@ dependencies:
|
|
123
123
|
- - ! '>='
|
124
124
|
- !ruby/object:Gem::Version
|
125
125
|
version: '0'
|
126
|
+
- !ruby/object:Gem::Dependency
|
127
|
+
name: rspec
|
128
|
+
requirement: !ruby/object:Gem::Requirement
|
129
|
+
none: false
|
130
|
+
requirements:
|
131
|
+
- - ! '>='
|
132
|
+
- !ruby/object:Gem::Version
|
133
|
+
version: 2.11.0
|
134
|
+
type: :development
|
135
|
+
prerelease: false
|
136
|
+
version_requirements: !ruby/object:Gem::Requirement
|
137
|
+
none: false
|
138
|
+
requirements:
|
139
|
+
- - ! '>='
|
140
|
+
- !ruby/object:Gem::Version
|
141
|
+
version: 2.11.0
|
126
142
|
description: ! 'Nokogiri based ''have_tag'' and ''with_tag'' matchers for rspec 2.x.x.
|
127
143
|
Does not depend on assert_select matcher, provides useful error messages.
|
128
144
|
|
@@ -141,23 +157,21 @@ files:
|
|
141
157
|
- Gemfile
|
142
158
|
- README.md
|
143
159
|
- Rakefile
|
144
|
-
- assets/form.html
|
145
|
-
- assets/ordered_list.html
|
146
|
-
- assets/paragraphs.html
|
147
|
-
- assets/quotes.html
|
148
|
-
- assets/search_and_submit.html
|
149
|
-
- assets/special.html
|
150
160
|
- cucumber.yml
|
151
161
|
- features/js_generated_content.feature
|
152
162
|
- features/step_definitions/steps.rb
|
153
163
|
- features/support/env.rb
|
154
164
|
- lib/rspec-html-matchers.rb
|
155
|
-
- mikhalok.jpg
|
156
165
|
- rspec-html-matchers.gemspec
|
166
|
+
- spec/assets/form.html
|
167
|
+
- spec/assets/ordered_list.html
|
168
|
+
- spec/assets/paragraphs.html
|
169
|
+
- spec/assets/quotes.html
|
170
|
+
- spec/assets/search_and_submit.html
|
171
|
+
- spec/assets/special.html
|
157
172
|
- spec/matchers/form_matchers_spec.rb
|
158
173
|
- spec/matchers/have_tag_spec.rb
|
159
174
|
- spec/spec_helper.rb
|
160
|
-
- spec/support/helpers.rb
|
161
175
|
homepage: http://github.com/kucaahbe/rspec-html-matchers
|
162
176
|
licenses: []
|
163
177
|
post_install_message:
|
@@ -170,12 +184,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
170
184
|
- - ! '>='
|
171
185
|
- !ruby/object:Gem::Version
|
172
186
|
version: '0'
|
187
|
+
segments:
|
188
|
+
- 0
|
189
|
+
hash: -132393383926861216
|
173
190
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
174
191
|
none: false
|
175
192
|
requirements:
|
176
193
|
- - ! '>='
|
177
194
|
- !ruby/object:Gem::Version
|
178
195
|
version: '0'
|
196
|
+
segments:
|
197
|
+
- 0
|
198
|
+
hash: -132393383926861216
|
179
199
|
requirements: []
|
180
200
|
rubyforge_project: rspec-html-matchers
|
181
201
|
rubygems_version: 1.8.23
|
@@ -186,7 +206,12 @@ test_files:
|
|
186
206
|
- features/js_generated_content.feature
|
187
207
|
- features/step_definitions/steps.rb
|
188
208
|
- features/support/env.rb
|
209
|
+
- spec/assets/form.html
|
210
|
+
- spec/assets/ordered_list.html
|
211
|
+
- spec/assets/paragraphs.html
|
212
|
+
- spec/assets/quotes.html
|
213
|
+
- spec/assets/search_and_submit.html
|
214
|
+
- spec/assets/special.html
|
189
215
|
- spec/matchers/form_matchers_spec.rb
|
190
216
|
- spec/matchers/have_tag_spec.rb
|
191
217
|
- spec/spec_helper.rb
|
192
|
-
- spec/support/helpers.rb
|
data/assets/quotes.html
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
<div>sample text</div>
|
2
|
-
<span>sample with 'single' quotes</span>
|
3
|
-
<span>sample with 'single' and "double" quotes</span>
|
4
|
-
<p>one</p>
|
5
|
-
<p>two</p>
|
6
|
-
<p>three </p>
|
7
|
-
<p>315</p>
|
8
|
-
<p>
|
9
|
-
content with ignored spaces around
|
10
|
-
</p>
|
11
|
-
<p>
|
12
|
-
content with ignored spaces in
|
13
|
-
</p>
|
14
|
-
<p>
|
15
|
-
content with nbsp
|
16
|
-
</p>
|
17
|
-
<p>
|
18
|
-
content with nbsp and spaces around
|
19
|
-
</p>
|
20
|
-
<pre> 1. bla
|
21
|
-
2. bla </pre>
|
22
|
-
|
23
|
-
<a href="#">học</a>
|
24
|
-
<!--
|
25
|
-
vim:list
|
26
|
-
-->
|
data/mikhalok.jpg
DELETED
Binary file
|
data/spec/support/helpers.rb
DELETED