blob: f4a7612a73d657d16ab5c4fdbd429eaba7566eb1 (
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
|
#!/usr/bin/ruby -rubygems
require 'test/unit'
#
# This test is skipped if we cannot load the rubocop-gem.
#
class TestRubocop < Test::Unit::TestCase
def setup
end
def teardown
end
def test_code
begin
require 'rubocop'
cli = RuboCop::CLI.new
result = cli.run
assert(result == 0, 'No errors found')
rescue LoadError => ex
skip("Failed to load 'rubocop' gem - skipping")
end
end
end
|