spec/engineyard-visualvm_spec.rb in engineyard-visualvm-0.5.0 vs spec/engineyard-visualvm_spec.rb in engineyard-visualvm-0.5.1

- old
+ new

@@ -4,9 +4,25 @@ # software license details. #++ require File.expand_path('../spec_helper', __FILE__) +describe EngineYard::VisualVM::Helpers do + context "when included in a class" + let(:object) do + clz = Class.new + clz.class_eval { include EngineYard::VisualVM::Helpers } + clz.new + end + + it "can calculate JVM arguments" do + object.jvm_arguments.tap {|args| + args.should =~ /org\.jruby\.jmx\.agent/ + args.should =~ /javaagent:.*agent\.jar/ + } + end +end + describe EngineYard::VisualVM::CLI do let(:script) { Class.new(EngineYard::VisualVM::CLI) } context "#help" do it "prints the default port" do