spec/units/dugway/theme_spec.rb in dugway-1.0.4 vs spec/units/dugway/theme_spec.rb in dugway-1.0.5

- old
+ new

@@ -116,11 +116,11 @@ it "should sprocketize theme.js" do theme.file_content('theme.js').gsub(/\s+/, '').should == %{console.log('One');(function(){console.log('Two');}).call(this);} end it "should sprocketize and liquify theme.css" do - theme.file_content('theme.css').gsub(/\s+/, '').should == %{html,body{height:100%;}a{background:#0f0;color:red;}footercitea{background:url(/images/bc_badge.png)no-repeat;}/**/} + theme.file_content('theme.css').gsub(/\s+/, '').should == %{html,body{height:100%;}a{background:#0f0;color:red;}/**/} end end describe "#build_file" do it "should return the file content for most files" do @@ -132,23 +132,23 @@ it "should sprocketize and compress theme.js" do theme.build_file('theme.js').should == %{console.log(\"One\"),function(){console.log(\"Two\")}.call(this);} end it "should sprocketize and not liquify theme.css" do - theme.build_file('theme.css').gsub(/\s+/, '').should == %{html,body{height:100%;}a{background:#0f0;color:{{theme.link_color}};}footercitea{background:url({{'bc_badge.png'|theme_image_url}})no-repeat;}/**/} + theme.build_file('theme.css').gsub(/\s+/, '').should == %{html,body{height:100%;}a{background:#0f0;color:{{theme.link_color}};}/**/} end end describe "#files" do it "should return an array of all files" do - theme.files.should =~ ["cart.html", "contact.html", "home.html", "layout.html", "maintenance.html", "product.html", "products.html", "screenshot.jpg", "settings.json", "theme.css", "theme.js", "images/bc_badge.png", "images/logo_bc.png", "images/slideshow/1.gif", "images/slideshow/2.gif", "images/slideshow/3.gif", "images/slideshow/4.gif", "images/slideshow/5.gif", "images/small.svg", "fonts/icons.ttf", "fonts/icons.woff"] + theme.files.should =~ ["cart.html", "contact.html", "home.html", "layout.html", "maintenance.html", "product.html", "products.html", "screenshot.jpg", "settings.json", "theme.css", "theme.js", "images/logo_bc.png", "images/slideshow/1.gif", "images/slideshow/2.gif", "images/slideshow/3.gif", "images/slideshow/4.gif", "images/slideshow/5.gif", "images/small.svg", "fonts/icons.ttf", "fonts/icons.woff"] end end describe "#image_files" do it "should return an array of all image files" do - theme.image_files.should =~ ["images/bc_badge.png", "images/logo_bc.png", "images/slideshow/1.gif", "images/slideshow/2.gif", "images/slideshow/3.gif", "images/slideshow/4.gif", "images/slideshow/5.gif", "images/small.svg"] + theme.image_files.should =~ ["images/logo_bc.png", "images/slideshow/1.gif", "images/slideshow/2.gif", "images/slideshow/3.gif", "images/slideshow/4.gif", "images/slideshow/5.gif", "images/small.svg"] end end describe "#font_files" do it "shoud return an array of all font files" do @@ -162,10 +162,10 @@ theme.errors.should be_empty end describe "when missing a required file" do before(:each) do - theme.stub(:read_source_file).with('cart.html') { theme.unstub!(:read_source_file); nil } + theme.stub(:read_source_file).with('cart.html') { theme.unstub(:read_source_file); nil } end it "should not be valid" do theme.valid?.should be(false) theme.errors.size.should == 1