Module: Quickdraw::Matchers::ToBeA

Defined in:
lib/quickdraw/matchers/to_be_a.rb

Instance Method Summary collapse

Instance Method Details

#not_to_be_a(type) ⇒ Object Also known as: not_to_be_an



10
11
12
13
14
# File 'lib/quickdraw/matchers/to_be_a.rb', line 10

def not_to_be_a(type)
	refute type === value do
		"expected `#{value.inspect}` to not have the type `#{type.inspect}`"
	end
end

#to_be_a(type) ⇒ Object Also known as: to_be_an



4
5
6
7
8
# File 'lib/quickdraw/matchers/to_be_a.rb', line 4

def to_be_a(type)
	assert type === value do
		"expected `#{value.inspect}` to have the type `#{type.inspect}`"
	end
end