diff --git a/lib/guard/rubocop.rb b/lib/guard/rubocop.rb index 689fbd3..96a35d1 100644 --- a/lib/guard/rubocop.rb +++ b/lib/guard/rubocop.rb @@ -1,17 +1,17 @@ # coding: utf-8 require 'guard' -require 'guard/guard' +require 'guard/plugin' module Guard # This class gets API calls from `guard` and runs `rubocop` command via {Guard::Rubocop::Runner}. # An instance of this class stays alive in a `guard` command session. - class Rubocop < Guard + class Rubocop < Plugin autoload :Runner, 'guard/rubocop/runner' attr_reader :options, :failed_paths - def initialize(watchers = [], options = {}) + def initialize(options = {}) super @options = { diff --git a/spec/guard/rubocop_spec.rb b/spec/guard/rubocop_spec.rb index dc05c55..a6420ff 100644 --- a/spec/guard/rubocop_spec.rb +++ b/spec/guard/rubocop_spec.rb @@ -3,8 +3,7 @@ require 'spec_helper.rb' describe Guard::Rubocop, :silence_output do - subject(:guard) { Guard::Rubocop.new(watchers, options) } - let(:watchers) { [] } + subject(:guard) { Guard::Rubocop.new(options) } let(:options) { {} } describe '#options' do