stub CLI call on subject, not on Kernel

This commit is contained in:
Dmytrii Nagirniak 2011-06-17 23:56:09 +10:00
parent fe50bfd1c1
commit c84903ba19

View File

@ -39,7 +39,7 @@ describe Guard::RailsAssets do
end end
it 'should notify on failure' do it 'should notify on failure' do
stub_system_with false stub_system_with false
Kernel.should_not_receive(:`) subject.should_not_receive(:`) # don't obtain tree
Guard::Notifier.should_receive(:notify).with('see the details in the terminal', :title => "Can't compile assets", :image => :failed) Guard::Notifier.should_receive(:notify).with('see the details in the terminal', :title => "Can't compile assets", :image => :failed)
subject.compile_assets subject.compile_assets
end end