Permalink
Browse files

Helpers: add cache_buster

  • Loading branch information...
1 parent adcafb9 commit 6200ab23089a9fbd3e551ec15301127ff44d5a5c James A. Rosen committed Dec 13, 2011
Showing with 13 additions and 0 deletions.
  1. +6 −0 lib/rake-pipeline-web-filters/helpers.rb
  2. +7 −0 spec/helpers_spec.rb
@@ -50,6 +50,12 @@ def tilt(*args, &block)
def markdown(*args, &block)
filter(Rake::Pipeline::Web::Filters::MarkdownCompiler, *args, &block)
end
+
+ # Add a new {CacheBuster} to the pipeline.
+ # @see CacheBuster#initialize
+ def cache_buster(&block)
+ filter(Rake::Pipeline::Web::Filters::CacheBuster, &block)
+ end
end
end
@@ -54,4 +54,11 @@ def filter
filter.should be_kind_of(Rake::Pipeline::Web::Filters::MarkdownCompiler)
end
end
+
+ describe "#cache_buster" do
+ it "creates a CacheBuster" do
+ dsl.cache_buster
+ filter.should be_kind_of(Rake::Pipeline::Web::Filters::CacheBuster)
+ end
+ end
end

0 comments on commit 6200ab2

Please sign in to comment.