Sha256: 69dc108d38e07d93bd2a31ac57b9e9f054d5c88ab7c164317714c564ec492c5e
Contents?: true
Size: 828 Bytes
Versions: 1
Compression:
Stored size: 828 Bytes
Contents
require 'minitest/autorun' require_relative File.join('..', '..', '..', 'lib', 'deltacloud', 'models', 'base_model.rb') describe BaseModel do before do class CustomModel < BaseModel attr_accessor :name attr_accessor :custom end @model = CustomModel.new(:id => 'm1', :name => 'Model1', :custom => '1') end describe 'initialize' do it 'should properly advertise given attributes' do @model.must_respond_to :id @model.must_respond_to :name @model.must_respond_to :custom @model.id.must_equal 'm1' @model.name.must_equal 'Model1' @model.custom.must_equal '1' end it 'should report all attributes' do @model.attributes.must_include :id @model.attributes.must_include :name @model.attributes.must_include :custom end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
deltacloud-core-1.0.2 | tests/drivers/models/base_test.rb |