Sha256: c172cbba0fc89ce66def65c319c9231fde1e978ec4e700044dd432ac5d67a7ec

Contents?: true

Size: 495 Bytes

Versions: 1

Compression:

Stored size: 495 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

1 entries across 1 versions & 1 rubygems

Version Path
dm-rest-adapter-0.9.3 spec/delete_spec.rb