diff --git a/spec/builder_spec.rb b/spec/builder_spec.rb index 7623d708..a36af9b9 100644 --- a/spec/builder_spec.rb +++ b/spec/builder_spec.rb @@ -54,4 +54,8 @@ describe "Builder" do it "should not build partial files" do File.exists?("#{@root_dir}/build/_partial.html").should be_false end + + it "should minify inline javascript" do + File.readlines("#{@root_dir}/build/inline-js.html").length.should == 9 + end end \ No newline at end of file diff --git a/spec/fixtures/sample/views/inline-js.haml b/spec/fixtures/sample/views/inline-js.haml new file mode 100644 index 00000000..27d3ca64 --- /dev/null +++ b/spec/fixtures/sample/views/inline-js.haml @@ -0,0 +1,7 @@ +:javascript + ;(function() { + this; + should(); + all.be(); + on = { one: line }; + }); \ No newline at end of file