Sha256: 2e3ae7c5450d8d02f101a48acf6d960f701f769bef7b1f80dc4b5da05e63bc9c

Contents?: true

Size: 326 Bytes

Versions: 5

Compression:

Stored size: 326 Bytes

Contents

module PreCommit
  class RSpecFocusCheck
    def self.call(staged_files)
      staged_files = staged_files.grep(/_spec\.rb$/)
      return if staged_files.empty?
      result = `#{Utils.grep} ':focus' #{staged_files.join(" ")}`.strip
      return unless $?.success?
      ":focus found in specs:\n#{result}"
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
pre-commit-0.11.0 lib/pre-commit/checks/rspec_focus_check.rb
pre-commit-0.10.0 lib/pre-commit/checks/rspec_focus_check.rb
pre-commit-0.9.2 lib/pre-commit/checks/rspec_focus_check.rb
pre-commit-0.9.1 lib/pre-commit/checks/rspec_focus_check.rb
pre-commit-0.9.0 lib/pre-commit/checks/rspec_focus_check.rb