Sha256: e7a0c1776bdbc2d6eba3b844f8a6c408c36a8146e39c58ae615b922eb17e51b2

Contents?: true

Size: 772 Bytes

Versions: 1

Compression:

Stored size: 772 Bytes

Contents

require "minitest/autorun"

if M::Frameworks.minitest5?
  class Meme
    def i_can_has_cheezburger?
      "OHAI!"
    end

    def will_it_blend?
      "YES!"
    end
  end

  class TestMeme < Minitest::Test
    def setup
      @meme = Meme.new
    end

    def test_that_kitty_can_eat
      assert_equal "OHAI!", @meme.i_can_has_cheezburger?
    end

    def test_that_it_will_not_blend
      refute_match(/^maybe/i, @meme.will_it_blend?)
      refute_match(/^no/i, @meme.will_it_blend?)
      refute_match(/^lolz/i, @meme.will_it_blend?)
    end

    def test_that_kitty_can_eat_two_time
      assert_equal "OHAI!", @meme.i_can_has_cheezburger?
      assert_equal "OHAI!", @meme.i_can_has_cheezburger?
    end
  end

  Minitest.after_run { p "ran after run block" }
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
m-1.6.2 test/examples/minitest_5_example_test.rb