After do @testbed.stop if @testbed @testbed.stop! if @testbed @testbed=nil end Given /^an empty "([^\"]*)" directory$/ do |dir| if dir==".appswarm" p=File.join(ENV["HOME"],dir) `rm -rf #{p}` end #pending end Given /^a testbed$/ do @testbed=TestBed.new end When /^the cluster is running$/ do @testbed.runCluster sleep 1 end Then /^the appId of "(.*)" is different from the appId of "(.*)"$/ do |app0,app1| app0=testbed.getApp(app0) app1=testbed.getApp(app1) app0.getAppId.should_not == app1.getAppId end