From b3ee656a0e911f4a3f5b34f33aaa0885258af06f Mon Sep 17 00:00:00 2001 From: tdreyno Date: Sun, 5 Sep 2010 21:07:18 -0700 Subject: [PATCH] test coffee support --- spec/builder_spec.rb | 5 +++++ spec/fixtures/sample/views/javascripts/coffee_test.js.coffee | 3 +++ 2 files changed, 8 insertions(+) create mode 100644 spec/fixtures/sample/views/javascripts/coffee_test.js.coffee diff --git a/spec/builder_spec.rb b/spec/builder_spec.rb index a992fb92..617494d3 100644 --- a/spec/builder_spec.rb +++ b/spec/builder_spec.rb @@ -23,6 +23,11 @@ describe "Builder" do File.read("#{@root_dir}/build/index.html").should include("Comment in layout") end + it "should build coffee files" do + File.exists?("#{@root_dir}/build/javascripts/coffee_test.js").should be_true + File.read("#{@root_dir}/build/javascripts/coffee_test.js").should include("Array.prototype.slice") + end + it "should build haml files" do File.exists?("#{@root_dir}/build/index.html").should be_true File.read("#{@root_dir}/build/index.html").should include("

Welcome

") diff --git a/spec/fixtures/sample/views/javascripts/coffee_test.js.coffee b/spec/fixtures/sample/views/javascripts/coffee_test.js.coffee new file mode 100644 index 00000000..4a00b030 --- /dev/null +++ b/spec/fixtures/sample/views/javascripts/coffee_test.js.coffee @@ -0,0 +1,3 @@ +# Splats: +race = (winner, runners...) -> + print winner, runners \ No newline at end of file