Sha256: 7ab4bbea8f08984b51292c056157440667a6bec9ac84dd92d26a10e71c484792

Contents?: true

Size: 720 Bytes

Versions: 1

Compression:

Stored size: 720 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
end

Version data entries

1 entries across 1 versions & 1 rubygems

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