To expand on what is said in the RDoc and provide additional examples:
There is also a uses_player option to be used with scene_path. For
example:
uses_limelight :scene_path => "my_scene", :with_player =>
"some_player"
This gives you a scene with one prop of id, player and name of
"some_player." It will also load up all the players in "my_scene."
The last thing it creates for you is a helper method to find the prop
on the scene.
describe "SomePlayer" do
uses_limelight :scene_path => "my_scene", :with_player =>
"some_player"
it "should exist" do
some_player.should_not be_nil
end
end
This is useful if I'm testing a player that doesn't interact with
other players on the scene. If I need to interact with other players
on the scene, I'd probably be likely to use scene_path passing it a
block of props (using the same syntax as in the props.rb files).
describe "SomePlayer" do
uses_limelight :scene_path => "my_scene" do
foo :id => "foo"
bar :id => "bar"
end
it "should exist" do
scene.children.size.should == 2
scene.find("foo").should_not be_nil
scene.find("bar").should_not be_nil
end
end
With both of these ways of testing the player, the contents of the
props.rb file will be ignored.
Eric