Permalink
Browse files

[re]disable output during tests

  • Loading branch information...
1 parent c8be956 commit fd796552bb78f9693784cc4f888d5d680a9902cb @marcisme committed Nov 20, 2012
Showing with 12 additions and 0 deletions.
  1. +12 −0 spec/spec_helper.rb
View
@@ -34,4 +34,16 @@ def dir(d, mtime = nil)
RSpec.configure do |config|
config.include FakeFS::SpecHelpers
config.include FileHelpers
+
+ config.before(:each) do
+ # Setting GUARD_ENV to 'test' used to disable output, but the stubbing below
+ # (copied from guard's spec_helper) seems to be the way to do it now.
+
+ # Stub all UI methods, so no visible output appears for the UI class
+ ::Guard::UI.stub(:info)
+ ::Guard::UI.stub(:warning)
+ ::Guard::UI.stub(:error)
+ ::Guard::UI.stub(:debug)
+ ::Guard::UI.stub(:deprecation)
+ end
end

0 comments on commit fd79655

Please sign in to comment.