Sha256: 963e3a9a5267a0d69db60b98cfc257d3dec4f8dc338f74253fe08e8c07b42238

Contents?: true

Size: 426 Bytes

Versions: 17

Compression:

Stored size: 426 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:"
      end

      def pattern
        "(describe|context|it).*(:focus|focus:).*do"
      end

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

    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
pre-commit-0.35.0 lib/plugins/pre_commit/checks/rspec_focus.rb
pre-commit-0.34.0 lib/plugins/pre_commit/checks/rspec_focus.rb
pre-commit-0.33.0 lib/plugins/pre_commit/checks/rspec_focus.rb
pre-commit-0.32.0 lib/plugins/pre_commit/checks/rspec_focus.rb
pre-commit-0.31.0 lib/plugins/pre_commit/checks/rspec_focus.rb
pre-commit-0.30.0 lib/plugins/pre_commit/checks/rspec_focus.rb
pre-commit-0.29.0 lib/plugins/pre_commit/checks/rspec_focus.rb
pre-commit-0.28.0 lib/plugins/pre_commit/checks/rspec_focus.rb
pre-commit-0.27.0 lib/plugins/pre_commit/checks/rspec_focus.rb
pre-commit-0.26.0 lib/plugins/pre_commit/checks/rspec_focus.rb
pre-commit-0.25.0 lib/plugins/pre_commit/checks/rspec_focus.rb
pre-commit-0.24.0 lib/plugins/pre_commit/checks/rspec_focus.rb
pre-commit-0.23.0 lib/plugins/pre_commit/checks/rspec_focus.rb
pre-commit-0.22.1 lib/plugins/pre_commit/checks/rspec_focus.rb
pre-commit-0.22.0 lib/plugins/pre_commit/checks/rspec_focus.rb
pre-commit-0.21.0 lib/plugins/pre_commit/checks/rspec_focus.rb
pre-commit-0.20.0 lib/plugins/pre_commit/checks/rspec_focus.rb