Sha256: f3eaf9f608cdeb4d94379b8e2ec095e53c3c10559df7ca7431fa90b1aba30dfd

Contents?: true

Size: 689 Bytes

Versions: 20

Compression:

Stored size: 689 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
      expect(subject).to receive(:new_record?).and_return(false)
      expect(subject).to receive(:changed?).and_return(false)
      expect(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

20 entries across 20 versions & 1 rubygems

Version Path
active-fedora-9.7.3 spec/integration/autosave_association_spec.rb
active-fedora-9.7.2 spec/integration/autosave_association_spec.rb
active-fedora-9.12.0 spec/integration/autosave_association_spec.rb
active-fedora-9.11.0 spec/integration/autosave_association_spec.rb
active-fedora-9.10.4 spec/integration/autosave_association_spec.rb
active-fedora-9.10.3 spec/integration/autosave_association_spec.rb
active-fedora-9.10.2 spec/integration/autosave_association_spec.rb
active-fedora-9.10.1 spec/integration/autosave_association_spec.rb
active-fedora-9.10.0 spec/integration/autosave_association_spec.rb
active-fedora-9.10.0.pre2 spec/integration/autosave_association_spec.rb
active-fedora-9.10.0.pre1 spec/integration/autosave_association_spec.rb
active-fedora-9.9.1 spec/integration/autosave_association_spec.rb
active-fedora-9.9.0 spec/integration/autosave_association_spec.rb
active-fedora-9.8.2 spec/integration/autosave_association_spec.rb
active-fedora-9.8.1 spec/integration/autosave_association_spec.rb
active-fedora-9.8.0 spec/integration/autosave_association_spec.rb
active-fedora-9.7.1 spec/integration/autosave_association_spec.rb
active-fedora-9.7.0 spec/integration/autosave_association_spec.rb
active-fedora-9.6.2 spec/integration/autosave_association_spec.rb
active-fedora-9.6.1 spec/integration/autosave_association_spec.rb