Package com.puppetlabs.geppetto.ruby

Examples of com.puppetlabs.geppetto.ruby.RubyHelper.tearDown()


      targetResource.save(null);
      System.err.println("Target saved to: " + fileURI.toString());

    }
    finally {
      helper.tearDown();
    }

  }

  // Puppet PE 2.0 unzipped is not a full distribution - has no source to scan
View Full Code Here


        assertFalse("echotest2 should not be an rValue", f.isRValue());
      }

    }
    finally {
      helper.tearDown();
    }
  }

  // NOTE: On mac, macports changed format to a tgz file - can not load this (test has played out its role).
View Full Code Here

      assertEquals("the file path is reported", aRubyFile.getPath(), theIssue.getFileName());
      assertTrue("the error message is the expected", theIssue.getMessage().contains("unexpected tLPAREN_ARG"));
      // assertTrue("the error message is the expected", theIssue.getMessage().startsWith("syntax error, unexpected tLPAREN_ARG"));
    }
    finally {
      helper.tearDown();
    }
  }

  @Test
  public void testHelloBrokenWorld2() throws Exception {
View Full Code Here

      assertEquals("source line is 2", 2, theIssue.getLine());
      assertEquals("the file path is reported", aRubyFile.getPath(), theIssue.getFileName());
      assertTrue("the error message is the expected", theIssue.getMessage().contains("unexpected tLPAREN_ARG"));
    }
    finally {
      helper.tearDown();
    }
  }

  @Test
  public void testHelloWorld() throws Exception {
View Full Code Here

  public void testHelloWorld() throws Exception {
    File aRubyFile = TestDataProvider.getTestFile(new Path("testData/ruby/helloWorld.rb"));
    RubyHelper helper = new RubyHelper();
    helper.setUp();
    helper.parse(aRubyFile);
    helper.tearDown();
  }

}
View Full Code Here

    }
    catch(RubySyntaxException syntaxException) {
      getErrors().add(new RubySyntaxExceptionDiagnostic(syntaxException));
    }
    finally {
      helper.tearDown();
    }
  }

  @Override
  public void load(Map<?, ?> options) throws IOException {
View Full Code Here

      PPFunctionInfo info = foundFunctions.get(0);
      assertEquals("Should have found echotest", "echotest", info.getFunctionName());
      assertTrue("Should have been an rValue", info.isRValue());
    }
    finally {
      helper.tearDown();
    }
  }

  @Test
  public void testParseFunctionInQualifiedNamedModule() throws Exception {
View Full Code Here

      assertEquals("Should have found echotest", "echotest2", info.getFunctionName());
      assertTrue("Should have been an rValue", info.isRValue());

    }
    finally {
      helper.tearDown();
    }
  }

  @Test
  public void testParseFunctionWithFullyQualifiedName() throws Exception {
View Full Code Here

      assertEquals("Should have found echotest", "echotest3", info.getFunctionName());
      assertTrue("Should have been an rValue", info.isRValue());

    }
    finally {
      helper.tearDown();
    }
  }

  @Test
  public void testParseFunctionWithoutRtypeOrDoc() throws Exception {
View Full Code Here

      assertFalse("Should not have been an rValue", info.isRValue());
      assertEquals("Should be no documentation", "", info.getDocumentation());

    }
    finally {
      helper.tearDown();
    }
  }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.