Skip to content

Commit

Permalink
Conform to Guard::Plugin instead of Guard::Guard
Browse files Browse the repository at this point in the history
  • Loading branch information
yujinakayama committed Oct 6, 2013
1 parent e19c6c5 commit 384ca16
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 3 additions & 3 deletions lib/guard/rubocop.rb
Original file line number Diff line number Diff line change
@@ -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 = {
Expand Down
3 changes: 1 addition & 2 deletions spec/guard/rubocop_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 384ca16

Please # to comment.