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.1 spec/integration/autosave_association_spec.rb
active-fedora-9.0.0 spec/integration/autosave_association_spec.rb
active-fedora-9.0.0.rc3 spec/integration/autosave_association_spec.rb
active-fedora-9.0.0.rc2 spec/integration/autosave_association_spec.rb
active-fedora-9.0.0.rc1 spec/integration/autosave_association_spec.rb
active-fedora-9.0.0.beta8 spec/integration/autosave_association_spec.rb
active-fedora-9.0.0.beta7 spec/integration/autosave_association_spec.rb
active-fedora-9.0.0.beta6 spec/integration/autosave_association_spec.rb
active-fedora-9.0.0.beta5 spec/integration/autosave_association_spec.rb
active-fedora-9.0.0.beta4 spec/integration/autosave_association_spec.rb
active-fedora-9.0.0.beta3 spec/integration/autosave_association_spec.rb
active-fedora-9.0.0.beta2 spec/integration/autosave_association_spec.rb
active-fedora-9.0.0.beta1 spec/integration/autosave_association_spec.rb