Sha256: e010b6b7d1d43e967ea75275bafd23ff49660d8c8113290a20d00303f175b93f

Contents?: true

Size: 484 Bytes

Versions: 7

Compression:

Stored size: 484 Bytes

Contents

$LOAD_PATH << File.dirname(__FILE__)
require 'spec_helper'

describe 'A REST adapter' do

  before do
    @adapter = DataMapper::Repository.adapters[:default]
  end

  describe 'when deleting an existing resource' do
    before do
      @book = Book.new(:title => 'Hello, World!', :author => 'Anonymous')
      @book.stub!(:new_record?).and_return(false)
    end

    it 'should do an HTTP DELETE' do
      @adapter.should_receive(:http_delete)
      @book.destroy
    end

  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
dm-rest-adapter-0.9.9 spec/delete_spec.rb
dm-rest-adapter-0.9.10 spec/delete_spec.rb
dm-rest-adapter-0.9.4 spec/delete_spec.rb
dm-rest-adapter-0.9.5 spec/delete_spec.rb
dm-rest-adapter-0.9.6 spec/delete_spec.rb
dm-rest-adapter-0.9.7 spec/delete_spec.rb
dm-rest-adapter-0.9.8 spec/delete_spec.rb