Skip to content
Browse files

Rename Resource::State -> Resource::PersistenceState.

Also rename accessor: Resource#persisted_state -> #persistence_state and add previous accessor as a deprecated alias in dm-core/backwards.rb.
  • Loading branch information...
1 parent f3f9ec9 commit 5c5690d41db698598bf061b7543386f2b7bf7c48 @emmanuel emmanuel committed Jul 23, 2011
View
16 lib/dm-core.rb
@@ -52,13 +52,13 @@ module Undefined; end
require 'dm-core/query/sort'
require 'dm-core/resource'
-require 'dm-core/resource/state'
-require 'dm-core/resource/state/transient'
-require 'dm-core/resource/state/immutable'
-require 'dm-core/resource/state/persisted'
-require 'dm-core/resource/state/clean'
-require 'dm-core/resource/state/deleted'
-require 'dm-core/resource/state/dirty'
+require 'dm-core/resource/persistence_state'
+require 'dm-core/resource/persistence_state/transient'
+require 'dm-core/resource/persistence_state/immutable'
+require 'dm-core/resource/persistence_state/persisted'
+require 'dm-core/resource/persistence_state/clean'
+require 'dm-core/resource/persistence_state/deleted'
+require 'dm-core/resource/persistence_state/dirty'
require 'dm-core/property'
require 'dm-core/property/typecast/numeric'
@@ -108,6 +108,8 @@ module Undefined; end
require 'dm-core/core_ext/kernel' # TODO: do not load automatically
require 'dm-core/core_ext/symbol' # TODO: do not load automatically
+require 'dm-core/backwards' # TODO: do not load automatically
+
# A logger should always be present. Lets be consistent with DO
DataMapper::Logger.new(StringIO.new, :fatal)
View
2 lib/dm-core/associations/many_to_many.rb
@@ -365,7 +365,7 @@ def destroy!
end
each do |resource|
- resource.persisted_state = Resource::State::Immutable.new(resource)
+ resource.persistence_state = Resource::PersistenceState::Immutable.new(resource)
end
clear
View
13 lib/dm-core/backwards.rb
@@ -0,0 +1,13 @@
+require "dm-core/support/deprecate"
+
+module DataMapper
+ module Resource
+ extend Deprecate
+
+ deprecate :persisted_state, :persistence_state
+ deprecate :persisted_state=, :persistence_state=
+ deprecate :persisted_state?, :persistence_state?
+
+ end # module Resource
+
+end # module DataMapper
View
2 lib/dm-core/collection.rb
@@ -919,7 +919,7 @@ def destroy!
end
each do |resource|
- resource.persisted_state = Resource::State::Immutable.new(resource)
+ resource.persistence_state = Resource::PersistenceState::Immutable.new(resource)
end
clear
View
4 lib/dm-core/model.rb
@@ -627,13 +627,13 @@ def load(records, query)
resource.instance_variable_set(:@_repository, repository)
if identity_map
- resource.persisted_state = Resource::State::Clean.new(resource) unless resource.persisted_state?
+ resource.persistence_state = Resource::PersistenceState::Clean.new(resource) unless resource.persistence_state?
# defer setting the IdentityMap so second level caches can
# record the state of the resource after loaded
identity_map[key_values] = resource
else
- resource.persisted_state = Resource::State::Immutable.new(resource)
+ resource.persistence_state = Resource::PersistenceState::Immutable.new(resource)
end
resource
View
6 lib/dm-core/model/property.rb
@@ -206,7 +206,7 @@ def create_reader_for(property)
def #{name}
return #{instance_variable_name} if defined?(#{instance_variable_name})
property = properties[#{name.inspect}]
- #{instance_variable_name} = property ? persisted_state.get(property) : nil
+ #{instance_variable_name} = property ? persistence_state.get(property) : nil
end
RUBY
@@ -234,8 +234,8 @@ def create_writer_for(property)
#{writer_visibility}
def #{writer_name}(value)
property = properties[#{name.inspect}]
- self.persisted_state = persisted_state.set(property, value)
- persisted_state.get(property)
+ self.persistence_state = persistence_state.set(property, value)
+ persistence_state.get(property)
end
RUBY
end
View
6 lib/dm-core/model/relationship.rb
@@ -337,7 +337,7 @@ def #{reader_name}(query = nil)
# of 1:1, the underlying collection is hidden in a
# private ivar, and the resource is in a known ivar
- persisted_state.get(relationships[#{name.inspect}], query)
+ persistence_state.get(relationships[#{name.inspect}], query)
end
RUBY
end
@@ -357,8 +357,8 @@ def create_relationship_writer(relationship)
#{writer_visibility}
def #{writer_name}(target)
relationship = relationships[#{name.inspect}]
- self.persisted_state = persisted_state.set(relationship, target)
- persisted_state.get(relationship)
+ self.persistence_state = persistence_state.set(relationship, target)
+ persistence_state.get(relationship)
end
RUBY
end
View
47 lib/dm-core/resource.rb
@@ -76,24 +76,24 @@ def self.included(model)
# Get the persisted state for the resource
#
- # @return [Resource::State]
+ # @return [Resource::PersistenceState]
# the current persisted state for the resource
#
# @api private
- def persisted_state
- @_state ||= Resource::State::Transient.new(self)
+ def persistence_state
+ @_persistence_state ||= Resource::PersistenceState::Transient.new(self)
end
# Set the persisted state for the resource
#
- # @param [Resource::State]
+ # @param [Resource::PersistenceState]
# the new persisted state for the resource
#
# @return [undefined]
#
# @api private
- def persisted_state=(state)
- @_state = state
+ def persistence_state=(state)
+ @_persistence_state = state
end
# Test if the persisted state is set
@@ -102,8 +102,8 @@ def persisted_state=(state)
# true if the persisted state is set
#
# @api private
- def persisted_state?
- defined?(@_state) ? true : false
+ def persistence_state?
+ defined?(@_persistence_state) ? true : false
end
# Repository this resource belongs to in the context of this collection
@@ -149,7 +149,7 @@ def key
#
# @api public
def new?
- persisted_state.kind_of?(State::Transient)
+ persistence_state.kind_of?(PersistenceState::Transient)
end
# Checks if this Resource instance is saved
@@ -159,7 +159,7 @@ def new?
#
# @api public
def saved?
- persisted_state.kind_of?(State::Persisted)
+ persistence_state.kind_of?(PersistenceState::Persisted)
end
# Checks if this Resource instance is destroyed
@@ -179,7 +179,8 @@ def destroyed?
#
# @api public
def clean?
- persisted_state.kind_of?(State::Clean) || persisted_state.kind_of?(State::Immutable)
+ persistence_state.kind_of?(PersistenceState::Clean) ||
+ persistence_state.kind_of?(PersistenceState::Immutable)
end
# Checks if the resource has unsaved changes
@@ -201,7 +202,7 @@ def dirty?
#
# @api public
def readonly?
- persisted_state.kind_of?(State::Immutable)
+ persistence_state.kind_of?(PersistenceState::Immutable)
end
# Returns the value of the attribute.
@@ -237,7 +238,7 @@ def readonly?
# @api public
def attribute_get(name)
property = properties[name]
- persisted_state.get(property) if property
+ persistence_state.get(property) if property
end
alias_method :[], :attribute_get
@@ -279,7 +280,7 @@ def attribute_get(name)
# @api public
def attribute_set(name, value)
property = properties[name]
- self.persisted_state = persisted_state.set(property, value) if property
+ self.persistence_state = persistence_state.set(property, value) if property
end
alias_method :[]=, :attribute_set
@@ -334,7 +335,7 @@ def attributes=(attributes)
raise ArgumentError, "The attribute '#{name}' is not accessible in #{model}"
end
when Associations::Relationship, Property
- self.persisted_state = persisted_state.set(name, value)
+ self.persistence_state = persistence_state.set(name, value)
end
end
end
@@ -358,7 +359,7 @@ def reload
clear_subjects
end
- self.persisted_state = persisted_state.rollback
+ self.persistence_state = persistence_state.rollback
self
end
@@ -550,8 +551,8 @@ def inspect
#
# @api semipublic
def original_attributes
- if persisted_state.respond_to?(:original_attributes)
- persisted_state.original_attributes.dup.freeze
+ if persistence_state.respond_to?(:original_attributes)
+ persistence_state.original_attributes.dup.freeze
else
{}.freeze
end
@@ -753,7 +754,7 @@ def initialize_copy(original)
instance_variable_set(ivar, DataMapper::Ext.try_dup(instance_variable_get(ivar)))
end
- self.persisted_state = persisted_state.class.new(self)
+ self.persistence_state = persistence_state.class.new(self)
end
# Returns name of the repository this object
@@ -952,7 +953,7 @@ def child_associations
#
# @api private
def _persist
- self.persisted_state = persisted_state.commit
+ self.persistence_state = persistence_state.commit
end
# This method executes the hooks before and after resource creation
@@ -995,7 +996,7 @@ def update_with_hooks
#
# @api private
def _destroy(execute_hooks = true)
- self.persisted_state = persisted_state.delete
+ self.persistence_state = persistence_state.delete
_persist
end
@@ -1125,8 +1126,8 @@ def cmp?(other, operator)
# @api private
def set_default_value(subject)
- return unless persisted_state.respond_to?(:set_default_value, true)
- persisted_state.__send__(:set_default_value, subject)
+ return unless persistence_state.respond_to?(:set_default_value, true)
+ persistence_state.__send__(:set_default_value, subject)
end
# Execute all the queued up hooks for a given type and name
View
4 lib/dm-core/resource/state.rb → lib/dm-core/resource/persistence_state.rb
@@ -2,7 +2,7 @@ module DataMapper
module Resource
# the state of the resource (abstract)
- class State
+ class PersistenceState
extend Equalizer
equalize :resource
@@ -70,6 +70,6 @@ def set_child_key(relationship)
set(relationship, get(relationship))
end
- end # class State
+ end # class PersistenceState
end # module Resource
end # module DataMapper
View
8 lib/dm-core/resource/state/clean.rb → ...-core/resource/persistence_state/clean.rb
@@ -1,17 +1,17 @@
module DataMapper
module Resource
- class State
+ class PersistenceState
# a persisted/unmodified resource
class Clean < Persisted
def set(subject, value)
if not_modified?(subject, value)
self
else
- # assign to persisted_state so that if Dirty#set calls
+ # assign to persistence_state so that if Dirty#set calls
# a Relationship#set, which modifies a Property, the same
# Dirty state instance will be reused.
- state = resource.persisted_state = Dirty.new(resource)
+ state = resource.persistence_state = Dirty.new(resource)
state.set(subject, value)
end
end
@@ -35,6 +35,6 @@ def not_modified?(subject, value)
end
end # class Clean
- end # class State
+ end # class PersistenceState
end # module Resource
end # module DataMapper
View
4 lib/dm-core/resource/state/deleted.rb → ...ore/resource/persistence_state/deleted.rb
@@ -1,6 +1,6 @@
module DataMapper
module Resource
- class State
+ class PersistenceState
# a persisted/deleted resource
class Deleted < Persisted
@@ -25,6 +25,6 @@ def delete_resource
end
end # class Deleted
- end # class State
+ end # class PersistenceState
end # module Resource
end # module DataMapper
View
4 lib/dm-core/resource/state/dirty.rb → ...-core/resource/persistence_state/dirty.rb
@@ -1,6 +1,6 @@
module DataMapper
module Resource
- class State
+ class PersistenceState
# a persisted/dirty resource
class Dirty < Persisted
@@ -91,6 +91,6 @@ def valid_attributes?
end
end # class Dirty
- end # class State
+ end # class PersistenceState
end # module Resource
end # module DataMapper
View
6 lib/dm-core/resource/state/immutable.rb → ...e/resource/persistence_state/immutable.rb
@@ -1,9 +1,9 @@
module DataMapper
module Resource
- class State
+ class PersistenceState
# a not-persisted/unmodifiable resource
- class Immutable < State
+ class Immutable < PersistenceState
def get(subject, *args)
unless subject.loaded?(resource) || subject.kind_of?(Associations::Relationship)
raise ImmutableError, 'Immutable resource cannot be lazy loaded'
@@ -29,6 +29,6 @@ def rollback
end
end # class Immutable
- end # class State
+ end # class PersistenceState
end # module Resource
end # module DataMapper
View
6 lib/dm-core/resource/state/persisted.rb → ...e/resource/persistence_state/persisted.rb
@@ -1,9 +1,9 @@
module DataMapper
module Resource
- class State
+ class PersistenceState
# a persisted resource (abstract)
- class Persisted < State
+ class Persisted < PersistenceState
def get(subject, *args)
lazy_load(subject)
super
@@ -24,6 +24,6 @@ def lazy_load(subject)
end
end # class Persisted
- end # class State
+ end # class PersistenceState
end # module Resource
end # module DataMapper
View
6 lib/dm-core/resource/state/transient.rb → ...e/resource/persistence_state/transient.rb
@@ -1,9 +1,9 @@
module DataMapper
module Resource
- class State
+ class PersistenceState
# a not-persisted/modifiable resource
- class Transient < State
+ class Transient < PersistenceState
def get(subject, *args)
set_default_value(subject)
super
@@ -73,6 +73,6 @@ def valid_attributes?
end
end # class Transient
- end # class State
+ end # class PersistenceState
end # module Resource
end # module DataMapper
View
12 spec/semipublic/resource/state/clean_spec.rb
@@ -1,5 +1,5 @@
require 'spec_helper'
-describe DataMapper::Resource::State::Clean do
+describe DataMapper::Resource::PersistenceState::Clean do
before :all do
class ::Author
include DataMapper::Resource
@@ -20,8 +20,8 @@ class ::Author
before do
@resource = @model.create(:name => 'Dan Kubb')
- @state = @resource.persisted_state
- @state.should be_kind_of(DataMapper::Resource::State::Clean)
+ @state = @resource.persistence_state
+ @state.should be_kind_of(DataMapper::Resource::PersistenceState::Clean)
end
after do
@@ -45,13 +45,13 @@ class ::Author
supported_by :all do
it 'should return a Deleted state' do
- should eql(DataMapper::Resource::State::Deleted.new(@resource))
+ should eql(DataMapper::Resource::PersistenceState::Deleted.new(@resource))
end
end
end
describe '#get' do
- it_should_behave_like 'Resource::State::Persisted#get'
+ it_should_behave_like 'Resource::PersistenceState::Persisted#get'
end
describe '#set' do
@@ -67,7 +67,7 @@ class ::Author
it_should_behave_like 'A method that delegates to the superclass #set'
it 'should return a Dirty state' do
- should eql(DataMapper::Resource::State::Dirty.new(@resource))
+ should eql(DataMapper::Resource::PersistenceState::Dirty.new(@resource))
end
end
View
8 spec/semipublic/resource/state/deleted_spec.rb
@@ -1,5 +1,5 @@
require 'spec_helper'
-describe DataMapper::Resource::State::Deleted do
+describe DataMapper::Resource::PersistenceState::Deleted do
before :all do
class ::Author
include DataMapper::Resource
@@ -20,7 +20,7 @@ class ::Author
before do
@resource = @model.create(:name => 'Dan Kubb')
- @state = DataMapper::Resource::State::Deleted.new(@resource)
+ @state = DataMapper::Resource::PersistenceState::Deleted.new(@resource)
end
after do
@@ -32,7 +32,7 @@ class ::Author
supported_by :all do
it 'should return an Immutable state' do
- should eql(DataMapper::Resource::State::Immutable.new(@resource))
+ should eql(DataMapper::Resource::PersistenceState::Immutable.new(@resource))
end
it 'should delete the resource' do
@@ -58,7 +58,7 @@ class ::Author
end
describe '#get' do
- it_should_behave_like 'Resource::State::Persisted#get'
+ it_should_behave_like 'Resource::PersistenceState::Persisted#get'
end
describe '#set' do
View
16 spec/semipublic/resource/state/dirty_spec.rb
@@ -1,5 +1,5 @@
require 'spec_helper'
-describe DataMapper::Resource::State::Dirty do
+describe DataMapper::Resource::PersistenceState::Dirty do
before :all do
class ::Author
include DataMapper::Resource
@@ -24,8 +24,8 @@ class ::Author
@resource = @model.create(:id => 2, :name => 'Dan Kubb', :parent => @parent)
@resource.attributes = { :name => 'John Doe' }
- @state = @resource.persisted_state
- @state.should be_kind_of(DataMapper::Resource::State::Dirty)
+ @state = @resource.persistence_state
+ @state.should be_kind_of(DataMapper::Resource::PersistenceState::Dirty)
end
after do
@@ -44,7 +44,7 @@ class ::Author
end
it 'should return a Clean state' do
- should eql(DataMapper::Resource::State::Clean.new(@resource))
+ should eql(DataMapper::Resource::PersistenceState::Clean.new(@resource))
end
it 'should set the child key if the parent key changes' do
@@ -91,7 +91,7 @@ class ::Author
it_should_behave_like 'It resets resource state'
it 'should return a Deleted state' do
- should eql(DataMapper::Resource::State::Deleted.new(@resource))
+ should eql(DataMapper::Resource::PersistenceState::Deleted.new(@resource))
end
end
end
@@ -101,7 +101,7 @@ class ::Author
@loaded_value = 'John Doe'
end
- it_should_behave_like 'Resource::State::Persisted#get'
+ it_should_behave_like 'Resource::PersistenceState::Persisted#get'
end
describe '#rollback' do
@@ -115,7 +115,7 @@ class ::Author
it_should_behave_like 'It resets resource state'
it 'should return a Clean state' do
- should eql(DataMapper::Resource::State::Clean.new(@resource))
+ should eql(DataMapper::Resource::PersistenceState::Clean.new(@resource))
end
end
end
@@ -148,7 +148,7 @@ class ::Author
it_should_behave_like 'A method that delegates to the superclass #set'
it 'should return a Clean state' do
- should eql(DataMapper::Resource::State::Clean.new(@resource))
+ should eql(DataMapper::Resource::PersistenceState::Clean.new(@resource))
end
end
end
View
6 spec/semipublic/resource/state/immutable_spec.rb
@@ -1,5 +1,5 @@
require 'spec_helper'
-describe DataMapper::Resource::State::Immutable do
+describe DataMapper::Resource::PersistenceState::Immutable do
before :all do
class ::Author
include DataMapper::Resource
@@ -24,8 +24,8 @@ class ::Author
attributes = Hash[ @model.key.zip(@resource.key) ]
@resource = @model.first(attributes.merge(:fields => [ :name, :parent_id ]))
- @state = @resource.persisted_state
- @state.should be_kind_of(DataMapper::Resource::State::Immutable)
+ @state = @resource.persistence_state
+ @state.should be_kind_of(DataMapper::Resource::PersistenceState::Immutable)
end
after do
View
10 spec/semipublic/resource/state/transient_spec.rb
@@ -1,5 +1,5 @@
require 'spec_helper'
-describe DataMapper::Resource::State::Transient do
+describe DataMapper::Resource::PersistenceState::Transient do
before :all do
class ::Author
include DataMapper::Resource
@@ -26,8 +26,8 @@ class ::Author
@parent = @model.create(:name => 'John Doe')
@resource = @model.new(:name => 'Dan Kubb', :coding => false, :parent => @parent)
- @state = @resource.persisted_state
- @state.should be_kind_of(DataMapper::Resource::State::Transient)
+ @state = @resource.persistence_state
+ @state.should be_kind_of(DataMapper::Resource::PersistenceState::Transient)
end
after do
@@ -39,7 +39,7 @@ class ::Author
supported_by :all do
it 'should return the expected Clean state' do
- should eql(DataMapper::Resource::State::Clean.new(@resource))
+ should eql(DataMapper::Resource::PersistenceState::Clean.new(@resource))
end
it 'should set the serial property' do
@@ -80,7 +80,7 @@ class ::Author
}
expect do
- @resource.persisted_state = subject
+ @resource.persistence_state = subject
end.should change { @resource.original_attributes.dup }.from(original_attributes).to({})
end
View
30 spec/semipublic/resource/state_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-describe DataMapper::Resource::State do
+describe DataMapper::Resource::PersistenceState do
before :all do
class ::Author
include DataMapper::Resource
@@ -20,13 +20,13 @@ class ::Author
before do
@resource = @model.new(:name => 'Dan Kubb')
- @state = DataMapper::Resource::State.new(@resource)
+ @state = DataMapper::Resource::PersistenceState.new(@resource)
end
describe '.new' do
- subject { DataMapper::Resource::State.new(@resource) }
+ subject { DataMapper::Resource::PersistenceState.new(@resource) }
- it { should be_kind_of(DataMapper::Resource::State) }
+ it { should be_kind_of(DataMapper::Resource::PersistenceState) }
end
describe '#==' do
@@ -35,7 +35,7 @@ class ::Author
supported_by :all do
describe 'with the same class and resource' do
before do
- @other = DataMapper::Resource::State.new(@resource)
+ @other = DataMapper::Resource::PersistenceState.new(@resource)
end
it { should be(true) }
@@ -47,7 +47,7 @@ class ::Author
describe 'with the same class and different resource' do
before do
- @other = DataMapper::Resource::State.new(@model.new)
+ @other = DataMapper::Resource::PersistenceState.new(@model.new)
end
it { should be(false) }
@@ -59,7 +59,7 @@ class ::Author
describe 'with a different class and the same resource' do
before do
- @other = DataMapper::Resource::State::Clean.new(@resource)
+ @other = DataMapper::Resource::PersistenceState::Clean.new(@resource)
end
it 'should be true for a subclass' do
@@ -73,7 +73,7 @@ class ::Author
describe 'with a different class and different resource' do
before do
- @other = DataMapper::Resource::State::Clean.new(@model.new)
+ @other = DataMapper::Resource::PersistenceState::Clean.new(@model.new)
end
it { should be(false) }
@@ -90,7 +90,7 @@ class ::Author
subject { @state.send(method) }
it 'should raise an exception' do
- method(:subject).should raise_error(NotImplementedError, "DataMapper::Resource::State##{method} should be implemented")
+ method(:subject).should raise_error(NotImplementedError, "DataMapper::Resource::PersistenceState##{method} should be implemented")
end
end
end
@@ -101,7 +101,7 @@ class ::Author
supported_by :all do
describe 'with the same class and resource' do
before do
- @other = DataMapper::Resource::State.new(@resource)
+ @other = DataMapper::Resource::PersistenceState.new(@resource)
end
it { should be(true) }
@@ -113,7 +113,7 @@ class ::Author
describe 'with the same class and different resource' do
before do
- @other = DataMapper::Resource::State.new(@model.new)
+ @other = DataMapper::Resource::PersistenceState.new(@model.new)
end
it { should be(false) }
@@ -125,7 +125,7 @@ class ::Author
describe 'with a different class and the same resource' do
before do
- @other = DataMapper::Resource::State::Clean.new(@resource)
+ @other = DataMapper::Resource::PersistenceState::Clean.new(@resource)
end
it { should be(false) }
@@ -137,7 +137,7 @@ class ::Author
describe 'with a different class and different resource' do
before do
- @other = DataMapper::Resource::State::Clean.new(@model.new)
+ @other = DataMapper::Resource::PersistenceState::Clean.new(@model.new)
end
it { should be(false) }
@@ -202,7 +202,7 @@ class ::Author
end
it 'should return a state object' do
- should be_kind_of(DataMapper::Resource::State)
+ should be_kind_of(DataMapper::Resource::PersistenceState)
end
it 'should change the object attributes' do
@@ -218,7 +218,7 @@ class ::Author
end
it 'should return a state object' do
- should be_kind_of(DataMapper::Resource::State)
+ should be_kind_of(DataMapper::Resource::PersistenceState)
end
it 'should change the object relationship' do
View
10 spec/semipublic/shared/resource_state_shared_spec.rb
@@ -2,19 +2,19 @@
it 'should delegate to the superclass' do
# this is the only way I could think of to test if the
# superclass method is being called
- DataMapper::Resource::State.class_eval { alias_method :original_set, :set; undef_method(:set) }
+ DataMapper::Resource::PersistenceState.class_eval { alias_method :original_set, :set; undef_method(:set) }
method(:subject).should raise_error(NoMethodError)
- DataMapper::Resource::State.class_eval { alias_method :set, :original_set; undef_method(:original_set) }
+ DataMapper::Resource::PersistenceState.class_eval { alias_method :set, :original_set; undef_method(:original_set) }
end
end
share_examples_for 'A method that does not delegate to the superclass #set' do
it 'should delegate to the superclass' do
# this is the only way I could think of to test if the
# superclass method is not being called
- DataMapper::Resource::State.class_eval { alias_method :original_set, :set; undef_method(:set) }
+ DataMapper::Resource::PersistenceState.class_eval { alias_method :original_set, :set; undef_method(:set) }
method(:subject).should_not raise_error(NoMethodError)
- DataMapper::Resource::State.class_eval { alias_method :set, :original_set; undef_method(:original_set) }
+ DataMapper::Resource::PersistenceState.class_eval { alias_method :set, :original_set; undef_method(:original_set) }
end
end
@@ -36,7 +36,7 @@
end
end
-share_examples_for 'Resource::State::Persisted#get' do
+share_examples_for 'Resource::PersistenceState::Persisted#get' do
subject { @state.get(@key) }
supported_by :all do

0 comments on commit 5c5690d

Please sign in to comment.
Something went wrong with that request. Please try again.