diff --git a/motion/adapters/array_model_adapter.rb b/motion/adapters/array_model_adapter.rb index baf0f8e..776db48 100644 --- a/motion/adapters/array_model_adapter.rb +++ b/motion/adapters/array_model_adapter.rb @@ -164,6 +164,7 @@ def do_insert(options = {}) end def do_update(options = {}) + true end def do_delete diff --git a/spec/model_spec.rb b/spec/model_spec.rb index 1bb8c8c..4169132 100644 --- a/spec/model_spec.rb +++ b/spec/model_spec.rb @@ -168,6 +168,12 @@ class TypeCast Task.where(:name).eq('updated').should == 0 lambda{task.save}.should.change{Task.where(:name).eq('updated')} end + + it 'should not raise MotionModel::RecordNotSaved when save! is called' do + task = Task.create(:name => 'updateable') + task.name = 'updated' + lambda{task.save!}.should.not.raise(MotionModel::RecordNotSaved) + end end describe 'deleting' do