Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

support guard v1.1

  • Loading branch information...
commit 62842c417ded5470202eec560cb950e95969cf90 1 parent 787533e
@mattdbridges mattdbridges authored
Showing with 15 additions and 1 deletion.
  1. +2 −1  lib/guard/annotate.rb
  2. +13 −0 spec/guard/annotate_spec.rb
View
3  lib/guard/annotate.rb
@@ -34,9 +34,10 @@ def run_all
true
end
- def run_on_change( paths=[] )
+ def run_on_changes( paths=[] )
run_annotate
end
+ alias :run_on_change :run_on_changes
private
View
13 spec/guard/annotate_spec.rb
@@ -157,4 +157,17 @@
subject.run_on_change.should be_false
end
end
+
+ # For Guard 1.1. #run_on_change is deprecated
+ context "run_on_changes" do
+ it "should run annotate command" do
+ subject.should_receive(:system).with("bundle exec annotate --exclude tests,fixtures -p before")
+ subject.run_on_changes
+ end
+
+ it "should return false if annotate command fails" do
+ subject.should_receive(:system).with("bundle exec annotate --exclude tests,fixtures -p before").and_return(false)
+ subject.run_on_changes.should be_false
+ end
+ end
end
Please sign in to comment.
Something went wrong with that request. Please try again.