summaryrefslogtreecommitdiff
path: root/t/test-rubocop.rb
blob: e44ea141b67bd9fd90c95973dd49798b516e0fb2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/usr/bin/ruby -rubygems

require 'test/unit'


#
#  Skip this test if we cannot load the gem.
#
begin
  require 'rubocop'
rescue LoadError => ex
  puts "Failed to load 'rubocop' gem - skipping"
  exit(0)
end


class TestRubocop < Test::Unit::TestCase

  def setup
  end

  def teardown
  end

  def test_code
    cli = RuboCop::CLI.new
    result = cli.run
    assert(result == 0, 'No errors found')
  end

end