Sha256: 6d7604f469698fd354ce9dfcc0ecd24651157e735ebed7e7196254d4ae7027e2

Contents?: true

Size: 598 Bytes

Versions: 3

Compression:

Stored size: 598 Bytes

Contents

require 'spec_helper'

describe MassiveRecord::ORM::Persistence::Operations::Destroy do
  include MockMassiveRecordConnection

  let(:record) { TestClass.new("id-1") }
  let(:options) { {:this => 'hash', :has => 'options'} }
  
  subject { described_class.new(record, options) }

  it_should_behave_like "a persistence table operation class"


  describe "#execute" do
    it "asks row_for_record to destroy itself" do
      row = mock(Object)
      row.should_receive(:destroy).and_return true
      subject.should_receive(:row_for_record).and_return(row) 
      subject.execute
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
massive_record-0.2.2 spec/orm/persistence/operations/destroy_spec.rb
massive_record-0.2.2.rc2 spec/orm/persistence/operations/destroy_spec.rb
massive_record-0.2.2.rc1 spec/orm/persistence/operations/destroy_spec.rb