From de08098533ba7faf4526050b76f349b619223777 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Fri, 1 Feb 2013 23:12:31 -0600 Subject: checkstyle: use test DSL --- Library/Formula/checkstyle.rb | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'Library/Formula') diff --git a/Library/Formula/checkstyle.rb b/Library/Formula/checkstyle.rb index 33b1162d8..251883ec5 100644 --- a/Library/Formula/checkstyle.rb +++ b/Library/Formula/checkstyle.rb @@ -10,15 +10,12 @@ class Checkstyle < Formula bin.write_jar_script libexec/'checkstyle-5.6-all.jar', 'checkstyle' end - def test + test do # Note this test "fails" because the audit has issues # TODO - pipe through cat to ingore error code - mktemp do - # create test file - (Pathname.pwd/"Test.java").write <<-EOS.undent + (testpath/"Test.java").write <<-EOS.undent public class Test{ } - EOS - system "#{bin}/checkstyle", "-c", "#{libexec}/sun_checks.xml", "-r", "Test.java" - end + EOS + system "#{bin}/checkstyle", "-c", "#{libexec}/sun_checks.xml", "-r", "Test.java" end end -- cgit v1.2.3