spec/guard/foodcritic_spec.rb in guard-foodcritic-1.0.1 vs spec/guard/foodcritic_spec.rb in guard-foodcritic-1.0.2
- old
+ new
@@ -74,11 +74,11 @@
describe "#run_all" do
subject { guard.run_all }
let(:guard) { described_class.new [], :cookbook_paths => %w(cookbooks site-cookbooks), :notification => notification }
let(:notification) { false }
- let(:runner) { mock "runner", :run => true }
+ let(:runner) { double "runner", :run => true }
before { guard.stub(:runner).and_return(runner) }
it "runs the runner with the cookbook paths" do
runner.should_receive(:run).with(guard.options[:cookbook_paths]).and_return(true)
subject
@@ -94,10 +94,10 @@
shared_examples "lints specified cookbook files" do
let(:guard) { described_class.new([], :notification => notification) }
let(:notification) { false }
let(:paths) { %w(recipes/default.rb attributes/default.rb) }
- let(:runner) { mock "runner", :run => true }
+ let(:runner) { double "runner", :run => true }
before { guard.stub(:runner).and_return(runner) }
it "runs the runner with the changed paths" do
runner.should_receive(:run).with(paths).and_return(true)
subject