Skip to content

Instantly share code, notes, and snippets.

@8th-Light-Blog
Created June 29, 2011 16:12
Show Gist options
  • Save 8th-Light-Blog/1054198 to your computer and use it in GitHub Desktop.
Save 8th-Light-Blog/1054198 to your computer and use it in GitHub Desktop.
Blog Title: Limelight Tutorial: Tic Tac Toe Example (Part 1)
Author: Paul Pagel
Date: September 29th, 2008
$ mkdir tictactoe
$ cd tictactoe
$ mate .
$ jruby -S gem install limelight
$ mkdir spec
$ mkdir spec/props
require File.expand_path(File.dirname(__FILE__) + "/../spec_helper")
describe "Props" do
include PropSpecHelper
before(:each) do
setup_prop_test
end
it "should have cell_0_0" do
@scene.find("cell_0_0").should_not be(nil)
end
end
$ jruby -S rake spec
1)
Errno::ENOENT in 'Props should have cell_0_0'
No such file or directory - File not found - /Users/paulwpagel/Desktop/tictactoe/props.rb
/Users/paulwpagel/Desktop/tictactoe/spec/spec_helper.rb:18:in `initialize'
/Users/paulwpagel/Desktop/tictactoe/spec/spec_helper.rb:18:in `setup_prop_test'
/Users/paulwpagel/Desktop/tictactoe/./spec/props/props_spec.rb:6:
Finished in 0.063 seconds
1 example, 1 failure
1)
'Props should have cell_0_0' FAILED
expected not nil, got nil
/Users/paulwpagel/Projects/tictac/./spec/props/prop_spec.rb:12:
Finished in 0.089 seconds
1 example, 1 failure
main do
board do
cell :id => "cell_0_0"
end
end
it "should have cells" do
@scene.find("cell_0_0").should_not be(nil)
@scene.find("cell_0_1").should_not be(nil)
@scene.find("cell_0_2").should_not be(nil)
@scene.find("cell_1_0").should_not be(nil)
@scene.find("cell_1_1").should_not be(nil)
@scene.find("cell_1_2").should_not be(nil)
@scene.find("cell_2_0").should_not be(nil)
@scene.find("cell_2_1").should_not be(nil)
@scene.find("cell_2_2").should_not be(nil)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment