Sha256: 02be563f40e239a04656f3db8054caca8d4d878965138e1ac84fc02f093eeab6
Contents?: true
Size: 591 Bytes
Versions: 17
Compression:
Stored size: 591 Bytes
Contents
require File.expand_path('../../../test_helper', __FILE__) require 'mocha/parameter_matchers/is_a' require 'mocha/inspect' class IsATest < Mocha::TestCase include Mocha::ParameterMatchers def test_should_match_object_that_is_a_specified_class matcher = is_a(Integer) assert matcher.matches?([99]) end def test_should_not_match_object_that_is_not_a_specified_class matcher = is_a(Integer) assert !matcher.matches?(['string']) end def test_should_describe_matcher matcher = is_a(Integer) assert_equal "is_a(Integer)", matcher.mocha_inspect end end
Version data entries
17 entries across 14 versions & 4 rubygems