spec/assetify_spec.rb in assetify-1.0.0.rc1 vs spec/assetify_spec.rb in assetify-1.0.0
- old
+ new
@@ -1,46 +1,46 @@
require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
describe Assetify do
- it "shoud read_jsfile" do
- mock_jsfile
- Assetify.read_jsfile.should have(1).asset
+ it "shoud read_assetfile" do
+ mock_assetfile
+ Assetfile.read.should have(1).asset
end
it "should skip comments" do
- mock_jsfile("#\n# Oi\n#\n")
- Assetify.read_jsfile.should be_nil
+ mock_assetfile("#\n# Oi\n#\n")
+ Assetfile.read.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")
+ mock_assetfile("#\n# Oi\n#\njs 'down', 'http://js.com/down-{VERSION}.js', '1.6'")
+ Assetfile.read.first.url.should eql("http://js.com/down-1.6.js")
end
describe "read css" do
before do
- mock_jsfile("#\n# CSS\n#\ncss 'grid', 'http://grid.com/down'")
+ mock_assetfile("#\n# CSS\n#\ncss 'grid', 'http://grid.com/down'")
end
- let(:asset) { Assetify.read_jsfile[0] }
+ let(:asset) { Assetfile.read[0] }
it "should read css" do
- Assetify.read_jsfile.should have(1).asset
+ Assetfile.read.should have(1).asset
end
it "should read css" do
- Assetify.read_jsfile.first.type.should eql(:css)
+ Assetfile.read.first.type.should eql(:css)
end
it "should have fullpath" do
asset.fullpath.should eql("vendor/assets/stylesheets/grid.css")
end
end
describe "readjs" do
- let(:asset) { mock_jsfile; Assetify.read_jsfile[0] }
+ let(:asset) { mock_assetfile; Assetfile.read[0] }
it "should be an asset" do
asset.should be_an Assetify::Asset
end