Sha256: 1a8d5d840dd514a5898b54985204940e15109705953af6bf298ccab861c260f6

Contents?: true

Size: 507 Bytes

Versions: 20

Compression:

Stored size: 507 Bytes

Contents

require 'spec_helper'

describe ActiveFedora::ReloadOnSave do
  let(:file) {  ActiveFedora::Base.new  }

  it 'defaults to call not reload' do
    file.should_not_receive(:reload)
    file.save
  end

  it 'reload can be turned on' do
    file.reload_on_save = true
    file.should_receive(:reload)
    file.save
  end

  it 'allows reload to be turned off and on' do
    file.reload_on_save = true
    file.should_receive(:reload).once
    file.save
    file.reload_on_save = false
    file.save
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

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