Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug with nested matchers #110

Merged
merged 1 commit into from Oct 26, 2012
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion lib/rake-pipeline.rb
Expand Up @@ -217,11 +217,12 @@ def build(options={}, &block)
# @return [Pipeline] the new pipeline # @return [Pipeline] the new pipeline
# @api private # @api private
def copy(target_class=self.class, &block) def copy(target_class=self.class, &block)
pipeline = target_class.build(&block) pipeline = target_class.new
pipeline.inputs = inputs pipeline.inputs = inputs
pipeline.tmpdir = tmpdir pipeline.tmpdir = tmpdir
pipeline.rake_application = rake_application pipeline.rake_application = rake_application
pipeline.project = project pipeline.project = project
pipeline.build &block
pipeline pipeline
end end


Expand Down
20 changes: 20 additions & 0 deletions spec/rake_acceptance_spec.rb
Expand Up @@ -603,4 +603,24 @@ def output_should_exist(expected=EXPECTED_JS_OUTPUT)
it_should_behave_like "a pipeline with dynamic files" it_should_behave_like "a pipeline with dynamic files"
end end
end end

it "should work with nested matchers" do
project = Rake::Pipeline::Project.build do
tmpdir "temporary"
output "public"

input tmp, "app/**/*.js" do
match "**/*" do
match "**/*.js" do
filter strip_asserts_filter
concat "javascripts/application.js"
end
end
end
end

project.invoke_clean

output_should_exist
end
end end