summaryrefslogtreecommitdiffstats
path: root/CLI/ruby/spec
diff options
context:
space:
mode:
Diffstat (limited to 'CLI/ruby/spec')
-rw-r--r--CLI/ruby/spec/game_of_life/cell_spec.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/CLI/ruby/spec/game_of_life/cell_spec.rb b/CLI/ruby/spec/game_of_life/cell_spec.rb
index e2fa7a4..063fd06 100644
--- a/CLI/ruby/spec/game_of_life/cell_spec.rb
+++ b/CLI/ruby/spec/game_of_life/cell_spec.rb
@@ -1,8 +1,8 @@
# frozen_string_literal: true
RSpec.describe GameOfLife::Cell do
- subject(:living_cell) { described_class.new(pos_x: nil, pos_y: nil, alive: true) }
- subject(:dead_cell) { described_class.new(pos_x: nil, pos_y: nil, alive: false) }
+ subject(:living_cell) { described_class.new(x: nil, y: nil, alive: true) }
+ subject(:dead_cell) { described_class.new(x: nil, y: nil, alive: false) }
describe "#to_s" do
before(:all) do
@@ -90,8 +90,8 @@ RSpec.describe GameOfLife::Cell do
describe "#living_neighbors" do
subject(:cell) { [living_cell, dead_cell].sample }
- let(:living_neighbors) { (0...rand(100)).map { described_class.new(pos_x: nil, pos_y: nil, alive: true) } }
- let(:dead_neighbors) { (0...rand(100)).map { described_class.new(pos_x: nil, pos_y: nil, alive: false) } }
+ let(:living_neighbors) { (0...rand(100)).map { described_class.new(x: nil, y: nil, alive: true) } }
+ let(:dead_neighbors) { (0...rand(100)).map { described_class.new(x: nil, y: nil, alive: false) } }
let(:neighbors) { (living_neighbors + dead_neighbors).shuffle }
it "returns the count of living neighbors cells" do