Permalink
Browse files

DRY SitePatch specs

  • Loading branch information...
1 parent f2864fc commit 83292a5757f22b71b0daeca404c988cd7f4b012d @ixti ixti committed Feb 16, 2013
Showing with 2 additions and 3 deletions.
  1. +2 −3 spec/lib/jekyll/assets_plugin/site_patch_spec.rb
View
5 spec/lib/jekyll/assets_plugin/site_patch_spec.rb
@@ -63,21 +63,20 @@ def source
context "#asset_path" do
+ subject { site.asset_path "app.css" }
+
context "with none cachebust" do
before { site.assets_config.cachebust = :none }
- subject { site.asset_path "app.css" }
it { should match(%r{^/assets/app\.css$}) }
end
context "with soft cachebust" do
before { site.assets_config.cachebust = :soft }
- subject { site.asset_path "app.css" }
it { should match(%r{^/assets/app\.css\?cb=[a-f0-9]{32}$}) }
end
context "with hard cachebust" do
before { site.assets_config.cachebust = :hard }
- subject { site.asset_path "app.css" }
it { should match(%r{^/assets/app-[a-f0-9]{32}\.css$}) }
end

0 comments on commit 83292a5

Please sign in to comment.