spec/assetify_spec.rb in assetify-0.0.2 vs spec/assetify_spec.rb in assetify-0.1.1
- old
+ new
@@ -1,21 +1,16 @@
require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
describe Assetify do
- include Assetify
- def mock_jsfile(d = 'js "cool", "http://cool.js/down"')
- File.should_receive(:open).once.with("Jsfile").and_return(d)
- end
-
it "shoud read_jsfile" do
mock_jsfile
Assetify.read_jsfile.should have(1).asset
end
it "should skip comments" do
mock_jsfile("#\n# Oi\n#\n")
- Assetify.read_jsfile.should be_empty
+ Assetify.read_jsfile.should be_nil
end
it "should work with versions url" do
mock_jsfile("#\n# Oi\n#\njs 'down', 'http://js.com/down-{VERSION}.js', '1.6'")
Assetify.read_jsfile.first.url.should eql("http://js.com/down-1.6.js")