spec/snowball_spec.rb in snowball-0.1.5 vs spec/snowball_spec.rb in snowball-0.1.6
- old
+ new
@@ -29,13 +29,25 @@
last_response.status.should eq 200
compiled = Regexp.escape("var func;\n\n func = function(arg) {\n return alert(\"Arg is \" + arg);\n };\n\n}")
last_response.body.should match compiled
end
- it "serves the coffee-script file raw if requested with .coffee as extension" do
+ it "serves the coffee-script file as source if requested with .coffee as extension" do
get "/js/require.coffee"
last_response.status.should eq 200
last_response.body.should match Regexp.escape("test = ->")
+ end
+
+ it "serves the javascript entry raw (not browserified) it matches the configured glob strings" do
+ get "/js/raw-2.js"
+ last_response.status.should eq 200
+ last_response.body.should match Regexp.escape('console.log("That is awesome!");')
+ end
+
+ it "serves the coffeescript entry raw (combiled, but not browserified) it matches the configured glob strings" do
+ get "/js/raw.js"
+ last_response.status.should eq 200
+ last_response.body.should match Regexp.escape('alert("I knew it!");')
end
it "includes transitive dependencies" do
get "/js/require.js"
last_response.status.should eq 200