Sha256: a54e3e5be0502ce1c237d326a727fa407f3495ba1c220a0d82fb0b35ffad142b

Contents?: true

Size: 691 Bytes

Versions: 33

Compression:

Stored size: 691 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

33 entries across 33 versions & 1 rubygems

Version Path
active-fedora-9.0.8 spec/integration/autosave_association_spec.rb
active-fedora-9.5.0 spec/integration/autosave_association_spec.rb
active-fedora-9.4.3 spec/integration/autosave_association_spec.rb
active-fedora-9.4.2 spec/integration/autosave_association_spec.rb
active-fedora-9.4.1 spec/integration/autosave_association_spec.rb
active-fedora-9.4.0 spec/integration/autosave_association_spec.rb
active-fedora-9.3.0 spec/integration/autosave_association_spec.rb
active-fedora-9.2.1 spec/integration/autosave_association_spec.rb
active-fedora-9.2.0 spec/integration/autosave_association_spec.rb
active-fedora-9.2.0.rc2 spec/integration/autosave_association_spec.rb
active-fedora-9.2.0.rc1 spec/integration/autosave_association_spec.rb
active-fedora-9.1.2 spec/integration/autosave_association_spec.rb
active-fedora-9.1.1 spec/integration/autosave_association_spec.rb
active-fedora-9.1.0 spec/integration/autosave_association_spec.rb
active-fedora-9.1.0.rc1 spec/integration/autosave_association_spec.rb
active-fedora-9.0.6 spec/integration/autosave_association_spec.rb
active-fedora-9.0.5 spec/integration/autosave_association_spec.rb
active-fedora-9.0.4 spec/integration/autosave_association_spec.rb
active-fedora-9.0.3 spec/integration/autosave_association_spec.rb
active-fedora-9.0.2 spec/integration/autosave_association_spec.rb