Sha256: 4587440360cc9f78cd11f1b19c8e9f3ad5833ba59cb2fa89b855bbd0814cb151

Contents?: true

Size: 394 Bytes

Versions: 10

Compression:

Stored size: 394 Bytes

Contents

require 'pre-commit/checks/grep'

module PreCommit
  module Checks
    class RspecFocus < Grep

      def files_filter(staged_files)
        staged_files.grep(/_spec\.rb$/)
      end

      def message
        ":focus found in specs:\n"
      end

      def pattern
        "':focus'"
      end

      def self.description
        "Finds ruby specs with ':focus'."
      end

    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
pre-commit-0.18.0 lib/plugins/pre_commit/checks/rspec_focus.rb
pre-commit-0.17.0 lib/plugins/pre_commit/checks/rspec_focus.rb
pre-commit-0.16.3 lib/plugins/pre_commit/checks/rspec_focus.rb
pre-commit-0.16.2 lib/plugins/pre_commit/checks/rspec_focus.rb
pre-commit-0.16.1 lib/plugins/pre_commit/checks/rspec_focus.rb
pre-commit-0.16.0 lib/plugins/pre_commit/checks/rspec_focus.rb
pre-commit-0.15.0 lib/plugins/pre_commit/checks/rspec_focus.rb
pre-commit-0.14.1 lib/plugins/pre_commit/checks/rspec_focus.rb
pre-commit-0.14.0 lib/plugins/pre_commit/checks/rspec_focus.rb
pre-commit-0.13.0 lib/plugins/pre_commit/checks/rspec_focus.rb