-
-
Save 8th-Light-Blog/1054198 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Blog Title: Limelight Tutorial: Tic Tac Toe Example (Part 1) | |
Author: Paul Pagel | |
Date: September 29th, 2008 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ mkdir tictactoe | |
$ cd tictactoe | |
$ mate . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ jruby -S gem install limelight |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ mkdir spec | |
$ mkdir spec/props |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ jruby -S rake spec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
main do | |
board do | |
cell :id => "cell_0_0" | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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