Sha256: 2650d8d47cf90ce0ad7767ec57c23555cb88fcbe11569f6dcee3c02e6e739760

Contents?: true

Size: 1.26 KB

Versions: 6

Compression:

Stored size: 1.26 KB

Contents

require 'jruby'
require 'torquebox/container/foundation'

describe TorqueBox::Container::Foundation do

  it "should be instantiable" do
    container = TorqueBox::Container::Foundation.new
  end

  it "should be startable and stoppable" do
    container = TorqueBox::Container::Foundation.new
    container.start
    container.stop
  end

  describe "foundational deployment" do
    before(:each) do
      @container = TorqueBox::Container::Foundation.new
      @container.start
    end
    after(:each) do
      @container.stop
    end

    it "should deploy a RuntimePoolDeployer" do
      @container['RuntimePoolDeployer'].should_not be_nil
    end

    it "should expose the current Ruby runtime as an MCBean" do
      ruby = @container['Ruby']
      ruby.should_not be_nil
      ruby.should be( JRuby.runtime )
    end

    it "should expose a ruby runtime factory as an MCBean" do
      factory = @container['RubyRuntimeFactory']
      factory.should_not be_nil
      ruby = factory.createInstance( __FILE__ )
      ruby.should be( JRuby.runtime )
    end
    
    it "should be able to deploy a non-existent deployment" do
      deployment = @container.deploy(object_id.to_s)
      unit = @container.deployment_unit( deployment.name )
      unit.should_not be_nil
    end
  end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
torquebox-container-foundation-1.1.1-java spec/container_spec.rb
torquebox-container-foundation-1.1-java spec/container_spec.rb
torquebox-container-foundation-1.0.1-java spec/container_spec.rb
torquebox-container-foundation-1.0.0-java spec/container_spec.rb
torquebox-container-foundation-1.0.0.CR2-java spec/container_spec.rb
torquebox-container-foundation-1.0.0.CR1-java spec/container_spec.rb