Sha256: 20541dd926af6d405d8e5886a63b500db1b272fb4fd59dd25103e82c4e5ed3b8

Contents?: true

Size: 688 Bytes

Versions: 8

Compression:

Stored size: 688 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
      allow(subject).to receive(:new_record?).and_return(false)
      allow(subject).to receive(:changed?).and_return(false)
      allow(subject).to receive(:marked_for_destruction?).and_return(false)
    end
    it {
      expect { subject.changed_for_autosave? }.to_not raise_error
    }
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
active-fedora-8.7.0 spec/integration/autosave_association_spec.rb
active-fedora-8.6.0 spec/integration/autosave_association_spec.rb
active-fedora-8.5.0 spec/integration/autosave_association_spec.rb
active-fedora-8.4.2 spec/integration/autosave_association_spec.rb
active-fedora-8.4.1 spec/integration/autosave_association_spec.rb
active-fedora-8.4.0 spec/integration/autosave_association_spec.rb
active-fedora-8.3.0 spec/integration/autosave_association_spec.rb
active-fedora-8.2.2 spec/integration/autosave_association_spec.rb