require File.expand_path(File.dirname(__FILE__) + '/test_helper') class TestSlimRails < ActionController::IntegrationTest test "normal view" do get "slim/normal" assert_response :success assert_template ["slim/normal", "layouts/application"] assert_html "
With a partial!
" end test "render integers" do get "slim/integers" assert_html "1337
" end test "render nil" do get "slim/nil" assert_html "" end test "content_for" do get "slim/content_for" assert_html "Heading set from a viewPage content
Hello Slim!
Hello Slim!
" end test "nested_attributes_form" do post "parents", 'parent[name]' => "p1", 'parent[children_attributes][0][name]' => "c1" get "parents/1/edit" assert_html '' end protected def assert_html(expected, options = {}) expected = "