Sha256: c35c43d6870cd12e40b67e4a4aa2f3c3c358489ff433f03c59736baf5f0e1242

Contents?: true

Size: 1.25 KB

Versions: 4

Compression:

Stored size: 1.25 KB

Contents

require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
require "active_fedora"

describe GenericContent do
  before :all do
    @behavior = GenericContent.deprecation_behavior
    @h_behavior = Hydra::GenericContent.deprecation_behavior
    GenericContent.deprecation_behavior = :silence
    Hydra::GenericContent.deprecation_behavior = :silence
  end

  after :all do
    GenericContent.deprecation_behavior = @behavior
    Hydra::GenericContent.deprecation_behavior = @h_behavior
  end
  
  before(:each) do
    @hydra_content = GenericContent.new
  end
  
  it "Should be a kind of ActiveFedora::Base" do
    @hydra_content.should be_kind_of(ActiveFedora::Base)
  end
  
  it "should include Hydra Model Methods" do
    @hydra_content.class.included_modules.should include(Hydra::ModelMethods)
    @hydra_content.should respond_to(:apply_depositor_metadata)
  end
  
  it "should have accessors for its default datastreams of content and original" do
    @hydra_content.should respond_to(:has_content?)
    @hydra_content.should respond_to(:content)
    @hydra_content.should respond_to(:content=)
    @hydra_content.should respond_to(:has_original?)
    @hydra_content.should respond_to(:original)
    @hydra_content.should respond_to(:original=)
  end
  
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
hydra-head-4.1.3 test_support/spec/models/generic_content_spec.rb
hydra-head-4.1.2 test_support/spec/models/generic_content_spec.rb
hydra-head-4.1.1 test_support/spec/models/generic_content_spec.rb
hydra-head-4.1.0 test_support/spec/models/generic_content_spec.rb