Fix slim options test

Signed-off-by: Konstantin Haase <konstantin.mailinglists@googlemail.com>
This commit is contained in:
Steve Hodgkiss 2010-11-05 16:00:08 +00:00 committed by Konstantin Haase
parent ca7fbe5472
commit cea255b3f2
1 changed files with 6 additions and 6 deletions

View File

@ -76,20 +76,20 @@ class SlimTest < Test::Unit::TestCase
it "merges the default slim options with the overrides and passes them to the slim engine" do it "merges the default slim options with the overrides and passes them to the slim engine" do
mock_app { mock_app {
set :haml, {:format => :html5, :attr_wrapper => '"'} # default slim attr are <tag attr='single-quoted'> set :slim, {:format => :html4}
get '/' do get '/' do
slim "! doctype html\nh1.header Hello World" slim "! doctype html\nh1.header Hello World"
end end
get '/html4' do get '/html5' do
slim "! doctype html\nh1.header Hello World", :format => :html4 slim "! doctype html\nh1.header Hello World", :format => :html5
end end
} }
get '/' get '/'
assert ok? assert ok?
assert_equal "<!DOCTYPE html><h1 class=\"header\">Hello World</h1>", body
get '/html4'
assert ok?
assert_match(/^#{HTML4_DOCTYPE}/, body) assert_match(/^#{HTML4_DOCTYPE}/, body)
get '/html5'
assert ok?
assert_equal "<!DOCTYPE html><h1 class=\"header\">Hello World</h1>", body
end end
end end
rescue rescue