diff options
| author | Steve Kemp <steve@steve.org.uk> | 2015-03-09 15:58:35 +0000 | 
|---|---|---|
| committer | Steve Kemp <steve@steve.org.uk> | 2015-03-09 15:58:35 +0000 | 
| commit | 07ce54ee0a47784fbf5c5badc30a21394ca9f366 (patch) | |
| tree | 6bfe49b1993df9bedfe7e36e5a1c86ef9d4b7416 /t | |
| parent | 0f746aa5ff0acfd99af10b83b02d2f62311168c4 (diff) | |
Added test-case for quiet-rubocop.
This is designed to ensure that we meet the style/code guideline
defined in `.rubocop.yml`.
Diffstat (limited to 't')
| -rwxr-xr-x | t/test-rubocop.rb | 31 | 
1 files changed, 31 insertions, 0 deletions
| diff --git a/t/test-rubocop.rb b/t/test-rubocop.rb new file mode 100755 index 0000000..e44ea14 --- /dev/null +++ b/t/test-rubocop.rb @@ -0,0 +1,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 | 
