hiroeorz-rspec-w3c-matchers 0.1.0 → 0.1.1
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/README.rdoc +45 -1
- data/VERSION.yml +1 -1
- metadata +3 -22
data/README.rdoc
CHANGED
@@ -1,6 +1,50 @@
|
|
1
1
|
= rspec-w3c-matchers
|
2
2
|
|
3
|
-
|
3
|
+
* http://github.com/hiroeorz/rspec-w3c-matchers/tree/master
|
4
|
+
|
5
|
+
== DESCRIPTION
|
6
|
+
|
7
|
+
RSpecW3CMatchers is rspec's custom spec, that check target is mached w3c valid (X)HTML.
|
8
|
+
|
9
|
+
== SYNOPSIS
|
10
|
+
|
11
|
+
require "rspec-w3c-matchers"
|
12
|
+
|
13
|
+
html_string.should be_valid_html
|
14
|
+
or
|
15
|
+
html_string.should be_xhtml_10_strict
|
16
|
+
and more...
|
17
|
+
|
18
|
+
Target is (x)html string or object, that defined "body" method.
|
19
|
+
|
20
|
+
sample:
|
21
|
+
require 'net/http'
|
22
|
+
require "rspec-w3c-matchers"
|
23
|
+
|
24
|
+
Net::HTTP.version_1_2
|
25
|
+
Net::HTTP.start("www.example.com", 80) { |http|
|
26
|
+
response = http.get("/index.html")
|
27
|
+
response.should be_xhtml_10_transitional
|
28
|
+
}
|
29
|
+
|
30
|
+
If you use merb rspec:
|
31
|
+
require "rspec-w3c-matchers" # in spec/spec_helper.rb
|
32
|
+
|
33
|
+
in spec/requests/sample_helper.rb:
|
34
|
+
|
35
|
+
describe "/sample/show" do
|
36
|
+
before(:each) do
|
37
|
+
@response = request("/sample/show")
|
38
|
+
end
|
39
|
+
|
40
|
+
it "should XHTML 1.0 Strict" do
|
41
|
+
@response.should be_xhtml_10_strict
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
== INSTALL
|
46
|
+
|
47
|
+
[sudo] gem install hiroeorz-rspec-w3c-matchers
|
4
48
|
|
5
49
|
== Copyright
|
6
50
|
|
data/VERSION.yml
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hiroeorz-rspec-w3c-matchers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- hiroeorz
|
@@ -11,27 +11,8 @@ cert_chain: []
|
|
11
11
|
|
12
12
|
date: 2009-04-18 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
|
-
dependencies:
|
15
|
-
|
16
|
-
name: rspec
|
17
|
-
type: :runtime
|
18
|
-
version_requirement:
|
19
|
-
version_requirements: !ruby/object:Gem::Requirement
|
20
|
-
requirements:
|
21
|
-
- - ">="
|
22
|
-
- !ruby/object:Gem::Version
|
23
|
-
version: 1.2.4
|
24
|
-
version:
|
25
|
-
- !ruby/object:Gem::Dependency
|
26
|
-
name: w3c_validators
|
27
|
-
type: :runtime
|
28
|
-
version_requirement:
|
29
|
-
version_requirements: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - ">="
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: 0.9.3
|
34
|
-
version:
|
14
|
+
dependencies: []
|
15
|
+
|
35
16
|
description:
|
36
17
|
email: hiroe.orz@gmail.com
|
37
18
|
executables: []
|