Sha256: 04b575307db96f7f84e6e6cfc062e21ecacada70b0e7c187c6cc873991c053d5

Contents?: true

Size: 649 Bytes

Versions: 25

Compression:

Stored size: 649 Bytes

Contents

require 'spec_helper'

describe ActiveFedora::Base do
  before :all do
    class MockAFBaseRelationship < ActiveFedora::Base
      has_metadata :name=>'foo', :type=>Hydra::ModsArticleDatastream
    end
  end
  after :all do
    Object.send(:remove_const, :MockAFBaseRelationship)
  end

  subject { MockAFBaseRelationship.new }

  context '#changed_for_autosave?' do
    before(:each) do
      subject.stub(:new_record?).and_return(false)
      subject.stub(:changed?).and_return(false)
      subject.stub(:marked_for_destruction?).and_return(false)
    end
    it {
      expect { subject.changed_for_autosave? }.to_not raise_error
    }
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
active-fedora-7.3.1 spec/integration/autosave_association_spec.rb
active-fedora-7.3.0 spec/integration/autosave_association_spec.rb
active-fedora-8.2.1 spec/integration/autosave_association_spec.rb
active-fedora-8.2.0 spec/integration/autosave_association_spec.rb
active-fedora-7.2.0 spec/integration/autosave_association_spec.rb
active-fedora-8.1.0 spec/integration/autosave_association_spec.rb
active-fedora-8.0.1 spec/integration/autosave_association_spec.rb
active-fedora-8.0.0 spec/integration/autosave_association_spec.rb
active-fedora-8.0.0.rc3 spec/integration/autosave_association_spec.rb
active-fedora-8.0.0.rc2 spec/integration/autosave_association_spec.rb
active-fedora-8.0.0.rc1 spec/integration/autosave_association_spec.rb
active-fedora-7.1.2 spec/integration/autosave_association_spec.rb
active-fedora-7.1.1 spec/integration/autosave_association_spec.rb
active-fedora-7.1.0 spec/integration/autosave_association_spec.rb
active-fedora-7.0.4 spec/integration/autosave_association_spec.rb
active-fedora-7.0.3 spec/integration/autosave_association_spec.rb
active-fedora-7.0.2 spec/integration/autosave_association_spec.rb
active-fedora-7.0.1 spec/integration/autosave_association_spec.rb
active-fedora-7.0.0 spec/integration/autosave_association_spec.rb
active-fedora-7.0.0.rc3 spec/integration/autosave_association_spec.rb