Sha256: d8822af4582a0a8954756ece3e75777dcb9c8e277ded21febd4e1da57cdc986f

Contents?: true

Size: 944 Bytes

Versions: 1

Compression:

Stored size: 944 Bytes

Contents

require 'eymiha_test'

class Foo

  def bar
    "bar"
  end

  def bass
    "bass"
  end

  private

  def frapp
    "frapp"
  end

  def mumble
    "mumble"
  end

end


class TC_test < Test::Unit::TestCase

  def test_bar
    foo = Foo.new
    probe(Foo,:bar) do
      assert(foo.bar == "bar") end
  end

  def test_bar_bass
    foo = Foo.new
    probe(Foo,:bar,:bass) do
      assert("#{foo.bar}_#{foo.bass}" == "bar_bass") end
  end

  def test_frapp
    foo = Foo.new
    probe(Foo,:frapp) do
      assert(foo.frapp == "frapp") end
  end

  def test_frapp_and_mumble
    foo = Foo.new
    probe(Foo,:frapp,:mumble) do
      assert("#{foo.frapp}_#{foo.mumble}" == "frapp_mumble") end
  end

  def test_bar_frapp_mumble
    foo = Foo.new
    probe(Foo,[:bar,:frapp],:mumble) do
      assert("#{foo.bar}_#{foo.frapp}_#{foo.mumble}" ==
             "bar_frapp_mumble") end
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
eymiha_test-1.0.1 test/tc_test.rb