From ccdfe24b0bb550f6f79d6a2a9f8c91e3e2f21929 Mon Sep 17 00:00:00 2001 From: tdreyno Date: Mon, 21 Sep 2009 10:11:22 -0700 Subject: [PATCH] inline js spec --- spec/builder_spec.rb | 4 ++++ spec/fixtures/sample/views/inline-js.haml | 7 +++++++ 2 files changed, 11 insertions(+) create mode 100644 spec/fixtures/sample/views/inline-js.haml 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