Permalink
Browse files

adding xhtml aliases

  • Loading branch information...
1 parent 918bfeb commit 698c180d7ff0a4970632b916f07aa120aebc8dda @tenderlove committed Jun 12, 2009
Showing with 11 additions and 1 deletion.
  1. +1 −0 lib/markup_validity/rspec.rb
  2. +4 −0 spec/matcher_spec.rb
  3. +6 −1 test/test_markup_validity.rb
@@ -13,6 +13,7 @@ def be_xhtml_transitional
end
end
end
+ alias :be_xhtml :be_xhtml_transitional
def be_xhtml_strict
Matcher.new :be_xhtml_strict do
@@ -10,6 +10,10 @@ module Matchers
Matchers.valid_document.should be_xhtml_transitional
end
+ it "is xhtml" do
+ Matchers.valid_document.should be_xhtml
+ end
+
it "is strict xhtml" do
Matchers.valid_document.should be_xhtml_strict
end
@@ -23,11 +23,16 @@ def setup
@fu = FakeUnit.new
end
- def test_valid_xhtml
+ def test_valid_xhtml_transitional
@fu.assert_xhtml_transitional valid_document
assert_equal [true, ''], @fu.assertions.first
end
+ def test_valid_xhtml
+ @fu.assert_xhtml valid_document
+ assert_equal [true, ''], @fu.assertions.first
+ end
+
def test_valid_xhtml_strict
@fu.assert_xhtml_strict valid_document
assert_equal [true, ''], @fu.assertions.first

0 comments on commit 698c180

Please sign in to comment.