Sha256: aa12a338d14c3eb3ed1c7e83a1f2d9d4964ab995e1042070de24c773da6951c2

Contents?: true

Size: 862 Bytes

Versions: 32

Compression:

Stored size: 862 Bytes

Contents

require 'spec_helper'

require 'active_fedora'
require 'active_fedora/model'
require 'mocha'
include Mocha::API

describe ActiveFedora::Property do
  
  before(:all) do
    @test_property = ActiveFedora::Property.new(stub("model_stub"),"file_name", :string)
  end
  
  it 'should provide .new' do
    ActiveFedora::Property.should respond_to(:new)
  end

  it 'should provide .name' do
    ActiveFedora::Property.should respond_to(:name)
  end

  
  it 'should provide .instance_variable_name' do
    #ActiveFedora::Property.should respond_to(:instance_variable_name)
    
    @test_property.should respond_to(:instance_variable_name)
  end

  describe '.instance_variable_name' do
    it 'should return the value of the name attribute with an @ appended' do
      @test_property.instance_variable_name.should eql("@#{@test_property.name}")
    end
  end
  
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
active-fedora-5.1.0 spec/unit/property_spec.rb
active-fedora-5.0.0 spec/unit/property_spec.rb
active-fedora-5.0.0.rc5 spec/unit/property_spec.rb
active-fedora-5.0.0.rc4 spec/unit/property_spec.rb
active-fedora-5.0.0.rc3 spec/unit/property_spec.rb
active-fedora-5.0.0.rc2 spec/unit/property_spec.rb
active-fedora-5.0.0.rc1 spec/unit/property_spec.rb
active-fedora-4.6.0.rc4 spec/unit/property_spec.rb
active-fedora-4.6.0.rc3 spec/unit/property_spec.rb
active-fedora-4.6.0.rc2 spec/unit/property_spec.rb
active-fedora-4.6.0.rc1 spec/unit/property_spec.rb
active-fedora-4.5.3 spec/unit/property_spec.rb
active-fedora-4.5.2 spec/unit/property_spec.rb
active-fedora-4.5.1 spec/unit/property_spec.rb
active-fedora-4.5.0 spec/unit/property_spec.rb
active-fedora-4.4.1 spec/unit/property_spec.rb
active-fedora-4.4.0 spec/unit/property_spec.rb
active-fedora-4.3.0 spec/unit/property_spec.rb
active-fedora-4.2.0 spec/unit/property_spec.rb
active-fedora-4.1.0 spec/unit/property_spec.rb