spec/rumble_spec.rb in keynote-0.2.0 vs spec/rumble_spec.rb in keynote-0.2.1
- old
+ new
@@ -2,14 +2,18 @@
# Original Rumble tests (c) 2011 Magnus Holm (https://github.com/judofyr).
require 'helper'
-Rumble = Keynote::Rumble
+if defined?(Minitest::Test)
+ klass = Minitest::Test
+else
+ klass = MiniTest::Unit::TestCase
+end
-class TestRumble < MiniTest::Unit::TestCase
- include Rumble
+class TestRumble < klass
+ include Keynote::Rumble
def assert_rumble(str, &blk)
exp = str.gsub(/(\s+(<)|>\s+)/) { $2 || '>' }
res = nil
build_html {
@@ -165,24 +169,24 @@
div { text str }
end
end
def test_error_tags_outside_rumble_context
- assert_raises Rumble::Error do
+ assert_raises Keynote::Rumble::Error do
div "content"
end
end
def test_error_selfclosing_content
- assert_raises Rumble::Error do
+ assert_raises Keynote::Rumble::Error do
build_html {
br "content"
}
end
end
def test_error_css_proxy_continue
- assert_raises Rumble::Error do
+ assert_raises Keynote::Rumble::Error do
build_html {
p.one("test").two
}
end
end