Permalink
Browse files

Update jboss_as_service test to know about @config.platform

  • Loading branch information...
1 parent 9988335 commit 1fcee5c1fbc185d5d7356b794e5a7d9595d111ed @bbrowning bbrowning committed Jan 17, 2011
Showing with 4 additions and 3 deletions.
  1. +4 −3 spec/services/jboss_as/jboss-as-service-spec.rb
@@ -30,7 +30,8 @@ module SteamCannon
ServiceManager.should_receive(:register).and_return( @db )
- @service = JBossASService.new( :log => @log )
+ @config = mock('Config', :platform => :ec2)
+ @service = JBossASService.new( :log => @log, :config => @config )
@exec_helper = @service.instance_variable_get(:@exec_helper)
@service_helper = @service.instance_variable_get(:@service_helper)
@@ -56,11 +57,11 @@ module SteamCannon
it "should return the selected artifact" do
File.should_receive(:exists?).with( @service.deploy_path("there.war") ).and_return( true )
File.should_receive(:size).with( @service.deploy_path("there.war") ).and_return( 1234 )
-
+
@service.artifact( "there.war" ).should == { :name => 'there.war', :size => 1234 }
end
end
-
+
it "should execute configure" do
cmd = mock(JBossAS::ConfigureCommand)
cmd.should_receive(:execute).with( :a => :b ).and_return( { :state => :stopped } )

0 comments on commit 1fcee5c

Please sign in to comment.