require 'minitest/unit'
require '../lib/Life.rb'

MiniTest::Unit.autorun

DEAD = 0
ALIVE = 1

class LifeTest < MiniTest::Unit::TestCase
  def setup
    @life = Life.make
  end

  def test_conditions
    assert_equal true, @life.dead?
    assert_equal false, @life.alive?
    assert_equal 0, @life.dead_or_alive?
    assert_equal 0, @life.dead_or_alive
  end

  def test_chages_born
    assert_equal true, @life.born
    assert_equal 1, @life.dead_or_alive?
  end

  def test_changes_die
    assert_equal true, @life.die
    assert_equal 0, @life.dead_or_alive?
  end

  def test_mutant_fearture
    Settings.class_eval('MUTANT = true')
    mutant = Life.make
    die_loop = lambda do
      loop do
        mutant.die
        break if mutant.alive?
      end
      true
    end
    assert_equal true, die_loop.call
  end
end

require 'minitest/unit'
require '../lib/Life.rb'

MiniTest::Unit.autorun

DEAD = 0
ALIVE = 1

class TestLife < MiniTest::Unit::TestCase
  def setup
    @life = Life.new 0
  end

  def test_conditions
    assert_equal true, @life.dead?
    assert_equal false, @life.alive?
    assert_equal 0, @life.dead_or_alive?
    assert_equal 0, @life.dead_or_alive
  end

  def test_chages_born
    assert_equal true, @life.born
    assert_equal 1, @life.dead_or_alive?
  end

  def test_changes_die
    assert_equal true, @life.die
    assert_equal 0, @life.dead_or_alive?
  end
end

--- 
+++ 
@@ -6,9 +6,9 @@
 DEAD = 0
 ALIVE = 1
 
-class TestLife < MiniTest::Unit::TestCase
+class LifeTest < MiniTest::Unit::TestCase
   def setup
-    @life = Life.new 0
+    @life = Life.make
   end
 
   def test_conditions
@@ -27,4 +27,17 @@
     assert_equal true, @life.die
     assert_equal 0, @life.dead_or_alive?
   end
+
+  def test_mutant_fearture
+    Settings.class_eval('MUTANT = true')
+    mutant = Life.make
+    die_loop = lambda do
+      loop do
+        mutant.die
+        break if mutant.alive?
+      end
+      true
+    end
+    assert_equal true, die_loop.call
+  end
 end
Fix tests for adapting changes to Life class
