Sha256: d79d17678547787eb9948c5264a1712ac16ee90d74d5eb4c2a37dc3320b79c87

Contents?: true

Size: 511 Bytes

Versions: 8

Compression:

Stored size: 511 Bytes

Contents

require 'codeqa/checkers/pattern_checker'

module Codeqa
  module Checkers
    class CheckRspecFocus < PatternChecker
      def name
        'rspec-focus'
      end

      def hint
        'Leftover :focus in spec found, please remove it.'
      end

      def self.check?(sourcefile)
        sourcefile.spec?
      end

    private

      def self.pattern
        @pattern ||= /:focus/
      end
      def error_msg(_line, line_number, _pos)
        ":focus in line #{line_number}"
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
codeqa-0.5.0 lib/codeqa/checkers/check_rspec_focus.rb
codeqa-0.4.2 lib/codeqa/checkers/check_rspec_focus.rb
codeqa-0.4.1 lib/codeqa/checkers/check_rspec_focus.rb
codeqa-0.4.0 lib/codeqa/checkers/check_rspec_focus.rb
codeqa-0.4.0.pre2 lib/codeqa/checkers/check_rspec_focus.rb
codeqa-0.4.0.pre lib/codeqa/checkers/check_rspec_focus.rb
codeqa-0.3.1 lib/codeqa/checkers/check_rspec_focus.rb
codeqa-0.3.0 lib/codeqa/checkers/check_rspec_focus.rb