Sha256: 31024832379609bf9a8b741694dc43c9515f9945a974ff7d5609525e48a4f27d

Contents?: true

Size: 623 Bytes

Versions: 3

Compression:

Stored size: 623 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + "/../test_helper")
require 'hardmock'

class ExpectationBuilderTest < Test::Unit::TestCase
  
  def test_build_expectation
    builder = ExpectationBuilder.new
    
    ex = builder.build_expectation( :stuff => 'inside' )
    assert_not_nil ex, "Didn't build an expectation"
    assert_kind_of SimpleExpectation, ex, "Wrong type!"

    # Shhhh... fragile, yes, whatever.  The functional tests do the 
    # real testing of this anyway
    assert_equal({:stuff => 'inside'}, ex.instance_variable_get('@options'), "Hash not sent to SimpleExpectation constructor")
  end

end

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
minilab-1.0.0-mswin32 vendor/hardmock/test/unit/expectation_builder_test.rb
hardmock-1.1.0 test/unit/expectation_builder_test.rb
hardmock-1.2.0 test/unit/expectation_builder_test.rb