Sha256: 71248b5aa69cd99a0bd14fe4620e83084d953e35795a51594143db1766d31162

Contents?: true

Size: 675 Bytes

Versions: 2

Compression:

Stored size: 675 Bytes

Contents

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

class ExpectationBuilderTest < Test::Unit::TestCase
  include Hardmock
  
  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 Expectation, 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

2 entries across 2 versions & 1 rubygems

Version Path
ceedling-0.29.1 vendor/hardmock/test/unit/expectation_builder_test.rb
ceedling-0.29.0 vendor/hardmock/test/unit/expectation_builder_test.rb