Sha256: 96dbd960a4e6978c1b36b9573f8c6a5e850df1ce3b468c25fa7cf5c8636109bb

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.0 test/tc_test.rb