test/options_test.rb in sinatra-assetpack-0.2.8 vs test/options_test.rb in sinatra-assetpack-0.3.0

- old
+ new

@@ -14,6 +14,21 @@ test "options" do assert App.assets.js_compression == :closure assert App.assets.packages['application.css'].path == "/assets/application.css" end + + test "serve requires :from parameter" do + err = assert_raise ArgumentError do + App.assets.serve "/foo" + end + assert_equal "Parameter :from is required", err.message + end + + test "serve requires :from to be directory" do + e = assert_raise Errno::ENOTDIR do + App.assets.serve "/foo", :from => "/does/not/exist" + end + end + + end