Module Mocks::Assertions
In: lib/mocks/assertions.rb

Methods

Attributes

mock_object  [RW] 

Public Instance methods

[Source]

# File lib/mocks/assertions.rb, line 28
    def assert_empty_mock ( comment='' )
      assert_mock_calls [], (comment.empty?)? 'not empty' : comment
    end

[Source]

# File lib/mocks/assertions.rb, line 32
    def assert_last_mock ( *ref )
      assert_equal(ref, mock_object.mock_calls.last.args)
    end

[Source]

# File lib/mocks/assertions.rb, line 36
    def assert_last_mock_args ( ref, comment='' )
      assert_equal(ref, mock_object.mock_calls_array.last.args, comment)
    end

[Source]

# File lib/mocks/assertions.rb, line 40
    def assert_last_mock_call ( ref, comment='' )
      assert_equal(ref, mock_object.mock_calls_array.last, comment)
    end

[Source]

# File lib/mocks/assertions.rb, line 13
    def assert_mock ( *ref )
      if ref.size == 1 and (f = ref.first).is_a? Array and f.first.is_a? Array
        ref = f
      end
      assert_equal(ref, mock_object.mock_args)
    end

[Source]

# File lib/mocks/assertions.rb, line 24
    def assert_mock_args ( ref, comment='' )
      assert_equal(ref, mock_object.mock_args, comment)
    end

[Source]

# File lib/mocks/assertions.rb, line 20
    def assert_mock_calls ( ref, comment='' )
      assert_equal(ref, mock_object.mock_calls_array, comment)
    end

[Source]

# File lib/mocks/assertions.rb, line 44
    def assert_mock_size ( size, comment='' )
      assert_equal(size, mock_object.mock_size, comment)
    end

[Validate]