Created
September 13, 2013 07:50
-
-
Save toctan/6547840 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'delegate' | |
class Bar < SimpleDelegator | |
def initialize(obj) | |
super(obj) | |
end | |
end | |
class Foo | |
end | |
require 'minitest/autorun' | |
describe Bar do | |
subject { Bar.new(Foo.new) } | |
it "assert kind of Bar" do | |
assert_kind_of(Bar, subject) # => true | |
end | |
it "must be kind of Bar" do | |
subject.must_be_kind_of Bar # => false | |
end | |
it "assert instance of Bar" do | |
assert_instance_of(Bar, subject) # => true | |
end | |
it "must be instance of Bar" do | |
subject.must_be_instance_of Bar # => false | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment