Sha256: d8594b8f7a3de8fde42195219ded6974df4413486ebca62d6ce30ca57f26c773

Contents?: true

Size: 455 Bytes

Versions: 6

Compression:

Stored size: 455 Bytes

Contents

# frozen_string_literal: true

module Overcommit::Hook::Shared
  # Runs `rspec` test suite before push
  #
  # @see http://rspec.info/
  module RSpec
    def run
      result = if @config['include']
                 execute(command, args: applicable_files)
               else
                 execute(command)
               end

      return :pass if result.success?

      output = result.stdout + result.stderr
      [:fail, output]
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
overcommit-0.67.0 lib/overcommit/hook/shared/r_spec.rb
overcommit-0.66.0 lib/overcommit/hook/shared/r_spec.rb
overcommit-0.65.0 lib/overcommit/hook/shared/r_spec.rb
overcommit-0.64.1 lib/overcommit/hook/shared/r_spec.rb
overcommit-0.64.0 lib/overcommit/hook/shared/r_spec.rb
overcommit-0.63.0 lib/overcommit/hook/shared/r_spec.rb