mirror of
https://github.com/sinatra/sinatra
synced 2023-03-27 23:18:01 -04:00
Update slim tests
Signed-off-by: Konstantin Haase <konstantin.mailinglists@googlemail.com>
This commit is contained in:
parent
4b38f3b8be
commit
495cb35011
1 changed files with 6 additions and 6 deletions
|
@ -27,7 +27,7 @@ class SlimTest < Test::Unit::TestCase
|
||||||
it "renders with inline layouts" do
|
it "renders with inline layouts" do
|
||||||
mock_app {
|
mock_app {
|
||||||
layout { %(h1\n | THIS. IS. \n == yield.upcase ) }
|
layout { %(h1\n | THIS. IS. \n == yield.upcase ) }
|
||||||
get('/') { slim 'em Sparta ' }
|
get('/') { slim 'em Sparta' }
|
||||||
}
|
}
|
||||||
get '/'
|
get '/'
|
||||||
assert ok?
|
assert ok?
|
||||||
|
@ -36,7 +36,7 @@ class SlimTest < Test::Unit::TestCase
|
||||||
|
|
||||||
it "renders with file layouts" do
|
it "renders with file layouts" do
|
||||||
slim_app {
|
slim_app {
|
||||||
slim '| Hello World ', :layout => :layout2
|
slim '| Hello World', :layout => :layout2
|
||||||
}
|
}
|
||||||
assert ok?
|
assert ok?
|
||||||
assert_equal "<h1>Slim Layout!</h1><p>Hello World</p>", body
|
assert_equal "<h1>Slim Layout!</h1><p>Hello World</p>", body
|
||||||
|
@ -54,7 +54,7 @@ class SlimTest < Test::Unit::TestCase
|
||||||
it "passes slim options to the slim engine" do
|
it "passes slim options to the slim engine" do
|
||||||
mock_app {
|
mock_app {
|
||||||
get '/' do
|
get '/' do
|
||||||
slim "! doctype html\nh1 Hello World ", :format => :html4
|
slim "! doctype html\nh1 Hello World", :format => :html4
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
get '/'
|
get '/'
|
||||||
|
@ -66,7 +66,7 @@ class SlimTest < Test::Unit::TestCase
|
||||||
mock_app {
|
mock_app {
|
||||||
set :slim, {:format => :html4}
|
set :slim, {:format => :html4}
|
||||||
get '/' do
|
get '/' do
|
||||||
slim "! doctype html\nh1 Hello World "
|
slim "! doctype html\nh1 Hello World"
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
get '/'
|
get '/'
|
||||||
|
@ -78,10 +78,10 @@ class SlimTest < Test::Unit::TestCase
|
||||||
mock_app {
|
mock_app {
|
||||||
set :haml, {:format => :html5, :attr_wrapper => '"'} # default slim attr are <tag attr='single-quoted'>
|
set :haml, {:format => :html5, :attr_wrapper => '"'} # default slim attr are <tag attr='single-quoted'>
|
||||||
get '/' do
|
get '/' do
|
||||||
slim "! doctype html\nh1.header Hello World "
|
slim "! doctype html\nh1.header Hello World"
|
||||||
end
|
end
|
||||||
get '/html4' do
|
get '/html4' do
|
||||||
slim "! doctype html\nh1.header Hello World ", :format => :html4
|
slim "! doctype html\nh1.header Hello World", :format => :html4
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
get '/'
|
get '/'
|
||||||
|
|
Loading…
Reference in a new issue