From 9cc9e6f70e82bf4cab8a5909412df90b4ac71179 Mon Sep 17 00:00:00 2001 From: Steve Kemp Date: Mon, 9 Mar 2015 15:58:35 +0000 Subject: Added test-case for quiet-rubocop. This is designed to ensure that we meet the style/code guideline defined in `.rubocop.yml`. --- t/test-rubocop.rb | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100755 t/test-rubocop.rb 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 -- cgit v1.2.1