We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8176bd8 commit 2fc209eCopy full SHA for 2fc209e
lib/guard/compat/plugin.rb
@@ -108,12 +108,16 @@ def self.deprecation(message, options = {})
108
end
109
110
111
- def self.notify(message, options = {})
112
- if Guard.const_defined?(:UI)
113
- Guard::Notifier.notify(message, options)
114
- else
115
- $stdout.puts(message)
116
- end
+ def self.notify(msg, options = {})
+ return $stdout.puts(msg) unless Guard.const_defined?(:UI)
+ return Notifier.notify(msg, options) if Notifier.respond_to?(:notify)
+
+ # test helper was included
+ note = 'NOTE: Notification is disabled when testing Guard plugins'\
117
+ ' (it makes no sense)'
118
119
+ $stderr.puts(note)
120
+ $stdout.puts(msg)
121
122
123
0 commit comments