Sha256: f32df3d738c76fdcc6e8d31d5295713a42a39eddc5d99fd43b9a2e3307dcd075

Contents?: true

Size: 508 Bytes

Versions: 5

Compression:

Stored size: 508 Bytes

Contents

require 'test_helper'

module Spy
  class TestDouble < MiniTest::Unit::TestCase
    def teardown
      Spy::Agency.instance.dissolve!
    end

    def test_double_creation
      double = Double.new("NewDouble", :meth_1, :meth_2)

      assert_nil double.meth_1
      assert_nil double.meth_2
    end

    def test_double_hash_input
      double = Double.new("NewDouble", meth_1: :meth_1, meth_2: :meth_2)

      assert_equal :meth_1, double.meth_1
      assert_equal :meth_2, double.meth_2
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
spy-0.2.5 test/spy/test_double.rb
spy-0.2.4 test/spy/test_double.rb
spy-0.2.3 test/spy/test_double.rb
spy-0.2.2 test/spy/test_double.rb
spy-0.2.1 test/spy/test_double.rb