Sha256: 503c57c7f025242d68b28b459dd085bb6cabe1e76dc06c60286ef6f6f12a3b11

Contents?: true

Size: 1.45 KB

Versions: 1

Compression:

Stored size: 1.45 KB

Contents

Before do
#  TestBed.finishTesting
end

After do
  TestBed.finishTesting
end

Given /^a testbed with an? "([^\"]*)" application$/ do |appName|
  @testbed=TestBed.new
  @testbed.run(appName)
end

Given /^a "([^\"]*)" application in it$/ do |name|
  @testbed.runAndWait(name)
end

When /^I store a string "([^\"]*)" for "([^\"]*)" within the "([^\"]*)"$/ do |str, app, store|
  store=@testbed.getApp(store)
  app=@testbed.getApp(app)
  app.should_not be_nil
  store.config(app)["exampleString"]=str
end

Then /^the restored string from the "([^\"]*)" for "([^\"]*)" is "([^\"]*)"$/ do |store,app,str|
  store=@testbed.getApp(store)
  app=@testbed.getApp(app)
  store.config(app)["exampleString"].content.should ==str
end

When /^the testbed is stopped$/ do
  @testbed.stop
  @testbed=nil
end

When /^a new testbed with a "([^\"]*)" application is started$/ do |app|
  @testbed=TestBed.new
  @testbed.run(app)
end

Then /^the restored string from the "([^\"]*)" for "([^\"]*)" is not existing$/ do |store,app|
  store=@testbed.getApp(store)
  app=@testbed.getApp(app)
  app.should_not be_nil
  store.config(app)["exampleString"].content.should be_nil
  
end

When /^the scenario is started$/ do
  
end

Then /^the "([^\"]*)" directory should be empty$/ do |dir|
  #p=
  Dir[File.join(ENV["HOME"],dir,"*")].should == []
end



Then /^a "([^\"]*)" application is running$/ do |appName|
  testbed.getLocalApplications.map{|a|a.class.to_s.gsub(/App$/,'')}.member?(appName).should be_true
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
appswarm-0.0.1 features/step_definitions/testbed_steps.rb