Sha256: 3b6041c91f8d2c15a6a8501934c774a08cd1a1053479f579aa021e399d989cf0

Contents?: true

Size: 612 Bytes

Versions: 55

Compression:

Stored size: 612 Bytes

Contents

require 'life'

describe Game do
  it 'should have a grid' do
    # given
    game = Game.new(5, 5)
    
    # then
    game.grid.should be_kind_of(Grid)
  end
  
  it 'should create a cell' do
    # given
    game = Game.new(2, 2)
    expected_grid = Grid.from_string( 'X. ..' )
    
    # when
    game.create_at(0, 0)
    
    # then
    game.grid.should == expected_grid
  end
  
  it 'should destroy a cell' do
    # given
    game = Game.new(2,2)
    game.grid = Grid.from_string('X. ..')
    
    # when
    game.destroy_at(0,0)
    
    # then
    game.grid.should == Grid.from_string('.. ..')
  end
end

Version data entries

55 entries across 55 versions & 10 rubygems

Version Path
dchelimsky-rspec-1.1.10 examples/stories/game-of-life/behaviour/examples/game_behaviour.rb
jnstq-acts_as_sms-0.1.0 test/vendor/plugins/rspec/examples/stories/game-of-life/behaviour/examples/game_behaviour.rb
jnstq-acts_as_sms-0.1.1 test/vendor/plugins/rspec/examples/stories/game-of-life/behaviour/examples/game_behaviour.rb
jnstq-acts_as_sms-0.1.3 test/vendor/plugins/rspec/examples/stories/game-of-life/behaviour/examples/game_behaviour.rb
jnstq-acts_as_sms-0.1.4 test/vendor/plugins/rspec/examples/stories/game-of-life/behaviour/examples/game_behaviour.rb
merb-core-1.1.3 spec10/public/webrat/test_app/gems/gems/rspec-1.1.11/examples/stories/game-of-life/behaviour/examples/game_behaviour.rb
merb-core-1.1.2 spec10/public/webrat/test_app/gems/gems/rspec-1.1.11/examples/stories/game-of-life/behaviour/examples/game_behaviour.rb
merb-core-1.1.1 spec10/public/webrat/test_app/gems/gems/rspec-1.1.11/examples/stories/game-of-life/behaviour/examples/game_behaviour.rb
merb-core-1.1.0 spec10/public/webrat/test_app/gems/gems/rspec-1.1.11/examples/stories/game-of-life/behaviour/examples/game_behaviour.rb
merb-core-1.1.0.rc1 spec10/public/webrat/test_app/gems/gems/rspec-1.1.11/examples/stories/game-of-life/behaviour/examples/game_behaviour.rb
merb-core-1.1.0.pre spec10/public/webrat/test_app/gems/gems/rspec-1.1.11/examples/stories/game-of-life/behaviour/examples/game_behaviour.rb
deckshuffler-0.0.2 vendor/plugins/rspec/examples/story/game-of-life/behaviour/examples/game_behaviour.rb
picolena-0.0.99 app_generators/picolena/templates/vendor/plugins/rspec/examples/stories/game-of-life/behaviour/examples/game_behaviour.rb
picolena-0.1.0 rails_plugins/rspec/examples/stories/game-of-life/behaviour/examples/game_behaviour.rb
picolena-0.1.1 rails_plugins/rspec/examples/stories/game-of-life/behaviour/examples/game_behaviour.rb
picolena-0.1.4 rails_plugins/rspec/examples/stories/game-of-life/behaviour/examples/game_behaviour.rb
picolena-0.1.2 rails_plugins/rspec/examples/stories/game-of-life/behaviour/examples/game_behaviour.rb
picolena-0.1.3 rails_plugins/rspec/examples/stories/game-of-life/behaviour/examples/game_behaviour.rb
picolena-0.1.5 rails_plugins/rspec/examples/stories/game-of-life/behaviour/examples/game_behaviour.rb
pictrails-0.5.0 vendor/plugins/rspec/examples/stories/game-of-life/behaviour/examples/game_behaviour.rb