Sha256: c80dce4d15a82940e7c2f94cbdabe1cbfb9a20ea53d66539e304bf6d23f57059

Contents?: true

Size: 909 Bytes

Versions: 20

Compression:

Stored size: 909 Bytes

Contents

# Minimal stub allowing a plugin to work

require 'guard/compat/plugin'

module Guard
  # Monkey patch Plugin to just keep the interface
  class Plugin
    attr_reader :options

    alias_method :old_initialize, :initialize

    def initialize(options = {})
      @options = options
    end

    remove_method(:old_initialize)
  end

  # Stub, but allow real Notifier to be used, because e.g. guard-minitest uses
  # is while guard-process is being tested
  unless Guard.const_defined?('Notifier')
    module Notifier
      # NOTE: do not implement anything here, so using any UI methods
      # causes tests to fail
    end
  end

  # Stub, but allow real UI to be used, because e.g. guard-minitest uses it
  # through using Guard::Notifier
  unless Guard.const_defined?('UI')
    module UI
      # NOTE: do not implement anything here, so using any UI methods
      # causes tests to fail
    end
  end
end

Version data entries

20 entries across 20 versions & 9 rubygems

Version Path
honeybadger-5.4.0 vendor/bundle/ruby/3.2.0/gems/guard-compat-1.2.1/lib/guard/compat/test/helper.rb
honeybadger-5.3.0 vendor/bundle/ruby/3.2.0/gems/guard-compat-1.2.1/lib/guard/compat/test/helper.rb
op_connect-0.1.2 vendor/bundle/ruby/3.1.0/gems/guard-compat-1.2.1/lib/guard/compat/test/helper.rb
honeybadger-4.5.3 vendor/bundle/ruby/2.6.0/gems/guard-compat-1.2.1/lib/guard/compat/test/helper.rb
alimentos-alu0100945645-0.1.0 vendor/bundle/ruby/2.3.0/gems/guard-compat-1.2.1/lib/guard/compat/test/helper.rb
alimentos-alu0100945645-1.0.0 vendor/bundle/ruby/2.3.0/gems/guard-compat-1.2.1/lib/guard/compat/test/helper.rb
comiditaULL-0.1.1 vendor/bundle/ruby/2.3.0/gems/guard-compat-1.2.1/lib/guard/compat/test/helper.rb
comidita_ull-0.1.1 vendor/bundle/ruby/2.3.0/gems/guard-compat-1.2.1/lib/guard/compat/test/helper.rb
comidita_ull-0.1.0 vendor/bundle/ruby/2.3.0/gems/guard-compat-1.2.1/lib/guard/compat/test/helper.rb
gameboard-3.1.0 vendor/bundle/ruby/2.3.0/gems/guard-compat-1.2.1/lib/guard/compat/test/helper.rb
gameboard-3.0.0 vendor/bundle/ruby/2.3.0/gems/guard-compat-1.2.1/lib/guard/compat/test/helper.rb
mastermind_adeybee-0.1.4 vendor/bundle/ruby/2.2.0/gems/guard-compat-1.2.1/lib/guard/compat/test/helper.rb
mastermind_adeybee-0.1.3 vendor/bundle/ruby/2.2.0/gems/guard-compat-1.2.1/lib/guard/compat/test/helper.rb
mastermind_adeybee-0.1.2 vendor/bundle/ruby/2.2.0/gems/guard-compat-1.2.1/lib/guard/compat/test/helper.rb
mastermind_adeybee-0.1.1 vendor/bundle/ruby/2.2.0/gems/guard-compat-1.2.1/lib/guard/compat/test/helper.rb
geminfo-0.1.0 path/gems/guard-compat-1.2.1/lib/guard/compat/test/helper.rb
guard-compat-1.2.1 lib/guard/compat/test/helper.rb
guard-compat-1.2.0 lib/guard/compat/test/helper.rb
guard-compat-1.1.0 lib/guard/compat/test/helper.rb
guard-compat-1.0.1 lib/guard/compat/test/helper.rb