X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/a5336e68a3fb124b6d024ea9b0b9d7bfe88b3b6a..0436b4878ce29c48b690772e61fcaf7aaae8a4ac:/vendor/gems/rspec-1.1.2/examples/stories/game-of-life/behaviour/examples/grid_behaviour.rb diff --git a/vendor/gems/rspec-1.1.2/examples/stories/game-of-life/behaviour/examples/grid_behaviour.rb b/vendor/gems/rspec-1.1.2/examples/stories/game-of-life/behaviour/examples/grid_behaviour.rb deleted file mode 100644 index 5be3af519..000000000 --- a/vendor/gems/rspec-1.1.2/examples/stories/game-of-life/behaviour/examples/grid_behaviour.rb +++ /dev/null @@ -1,66 +0,0 @@ -describe Grid do - it 'should be empty when created' do - # given - expected_contents = [ - [0, 0, 0], - [0, 0, 0] - ] - grid = Grid.new(2, 3) - - # when - contents = grid.contents - - # then - contents.should == expected_contents - end - - it 'should compare equal based on its contents' do - # given - grid1 = Grid.new(2, 3) - grid2 = Grid.new(2, 3) - - # then - grid1.should == grid2 - end - - it 'should be able to replace its contents' do - # given - grid = Grid.new(2,2) - new_contents = [[0,1,0], [1,0,1]] - - # when - grid.contents = new_contents - - # then - grid.contents.should == new_contents - grid.rows.should == 2 - grid.columns.should == 3 - end - - it 'should add an organism' do - # given - grid = Grid.new(2, 2) - expected = Grid.new(2, 2) - expected.contents = [[1,0],[0,0]] - - # when - grid.create_at(0,0) - - # then - grid.should == expected - end - - it 'should create itself from a string' do - # given - expected = Grid.new 3, 3 - expected.create_at(0,0) - expected.create_at(1,0) - expected.create_at(2,2) - - # when - actual = Grid.from_string "X.. X.. ..X" - - # then - actual.should == expected - end -end