Sha256: 0af8e2338a0e7e78eeb1630181990c310a750d0d614a90ada5dafa858e2f01bc
Contents?: true
Size: 865 Bytes
Versions: 4
Compression:
Stored size: 865 Bytes
Contents
require File.expand_path("#{File.dirname(__FILE__)}/helpers/helper") describe Sinatra::Decorator::Base do let(:decorator_class) { Class.new(Sinatra::Decorator::Base) } let(:model) { Object.new } describe "#initialize" do subject { decorator_class.new(model) } it 'Reports its type as if it was the original object' do subject.class.must_equal model.class subject.must_be_kind_of model.class assert subject.kind_of?(model.class), "The subject class (#{subject.class}) is not kind_of? the model class (#{model.class})." assert subject.is_a?(model.class), "The subject class (#{subject.class}) is not is_a? the model class (#{model.class})." assert subject.instance_of?(model.class), "The subject class (#{subject.class}) is not an instance_of? the model class (#{model.class})." end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
sinatra-decorator-0.2.0 | test/test_base.rb |
sinatra-decorator-0.1.1 | test/test_base.rb |
sinatra-decorator-0.0.2 | test/test_base.rb |
sinatra-decorator-0.0.1 | test/test_base.rb |