Sha256: 4fb80884d371bcce29a8eae313b6edc3328cb69a22eaa9878dce0159ae573779

Contents?: true

Size: 612 Bytes

Versions: 9

Compression:

Stored size: 612 Bytes

Contents

require_relative '../../test_helper'
require 'rubocop/git/runner'

describe RuboCop::Git::Runner do
  it 'exit with violations' do
    options = RuboCop::Git::Options.new
    # lib/rubocop/git/runner.rb:14:1: C: Trailing whitespace detected.
    options.commits = ["v0.0.4", "v0.0.5"]
    proc do
      _out, _err = capture_io do
        RuboCop::Git::Runner.new.run(options)
      end
    end.must_raise(SystemExit)
  end

  it 'fail with no options' do
    proc do
      _out, _err = capture_io do
        RuboCop::Git::Runner.new.run({})
      end
    end.must_raise(RuboCop::Git::Options::Invalid)
  end
end

Version data entries

9 entries across 9 versions & 3 rubygems

Version Path
cs-rubocop-git-0.1.4 test/rubocop/git/runner_test.rb
rubocop-git-0.1.3 test/rubocop/git/runner_test.rb
rubocop-git-kjanoudi-0.1.4 test/rubocop/git/runner_test.rb
rubocop-git-kjanoudi-0.1.3 test/rubocop/git/runner_test.rb
rubocop-git-kjanoudi-0.1.2 test/rubocop/git/runner_test.rb
rubocop-git-0.1.2 test/rubocop/git/runner_test.rb
rubocop-git-0.1.1 test/rubocop/git/runner_test.rb
rubocop-git-0.1.0 test/rubocop/git/runner_test.rb
rubocop-git-0.0.6 test/rubocop/git/runner_test.rb