Merge pull request #57 from nicksieger/specs-green-on-jruby

Fix spec on JRuby that was failing due to different execution order
This commit is contained in:
Thibaud Guillaume-Gentil 2011-05-06 12:04:19 -07:00
commit 466f4273f4
2 changed files with 5 additions and 0 deletions

View File

@ -8,6 +8,10 @@ module Guard
@disable = true @disable = true
end end
def self.turn_on
@disable = nil
end
def self.notify(message, options = {}) def self.notify(message, options = {})
unless @disable || ENV["GUARD_ENV"] == "test" unless @disable || ENV["GUARD_ENV"] == "test"
image = options[:image] || :success image = options[:image] || :success

View File

@ -7,6 +7,7 @@ describe Guard::Notifier do
before(:each) do before(:each) do
@saved_guard_env = ENV["GUARD_ENV"] @saved_guard_env = ENV["GUARD_ENV"]
ENV["GUARD_ENV"] = 'dont_mute_notify' ENV["GUARD_ENV"] = 'dont_mute_notify'
subject.turn_on
end end
if mac? if mac?