The basic idea is that you can publish productions on DRb and remote
control or test them this way.
Here's a recent example I worked on.
---- sandbox.feature ---
Feature: Sandbox
In order to play with Limelight features
As a user
I want to see the features in action.
Scenario: Sandbox
Given I have the sanbox production opened
When I do nothing
Then The active stage title should be "Limelight Sandbox"
Scenario: Click Me Scene
Given I have the sanbox production opened
And I click on "click_me_link"
When I click on "chromaton"
Then The text of "chromaton" should include "Clicks: 1"
When I click on "chromaton"
Then The text of "chromaton" should include "Clicks: 2"
When I click on "chromaton"
Then The text of "chromaton" should include "Clicks: 3"
When I click on "chromaton"
Then The text of "chromaton" should include "Clicks: 4"
When I click on "chromaton"
Then The text of "chromaton" should include "Clicks: 5"
---- limelight_steps.rb ----
at_exit do
$production.close
end
def scene
return $production.theater.stages[0].current_scene
end
Given /^I have the sanbox production opened$/ do
if $production.nil?
prod_dir = File.expand_path(File.dirname(__FILE__) + "/../../")
@ll_thread = Thread.new { system "jruby -S limelight open --
drb_port=9000 #{prod_dir}" }
require "drb"
DRb.start_service
$production = DRbObject.new(nil, "druby://localhost:9000")
begin
$production.name
rescue Exception => e
sleep(1)
retry
end
end
end
When /^I do nothing$/ do
end
Then /^The active stage title should be "([^\"]*)"$/ do |title|
active_stage = $production.theater.stages[0]
active_stage.title.should == title
end
When /^I click on "([^\"]*)"$/ do |id|
scene.find(id).mouse_clicked(nil)
sleep(0.25)
end
Then /^The text of "([^\"]*)" should include "([^\"]*)"$/ do |id, text|
scene.find(id).text.include?(text).should == true
end
@ll_thread = Thread.new { system "jruby -S limelight open --drb_port=9000 #{prod_dir}" }