spec/update_spec.rb in dm-rest-adapter-0.9.3 vs spec/update_spec.rb in dm-rest-adapter-0.9.4

- old
+ new

@@ -1,10 +1,10 @@ $LOAD_PATH << File.dirname(__FILE__) require 'spec_helper' describe 'A REST adapter' do - + describe 'when updating an existing resource' do before do @books_xml = <<-XML <book> <id type='integer'>42</id> @@ -14,23 +14,23 @@ </book> XML repository do |repo| @repository = repo @book = Book.new(:id => 42, - :title => 'Starship Troopers', - :author => 'Robert Heinlein', + :title => 'Starship Troopers', + :author => 'Robert Heinlein', :created_at => DateTime.parse('2008-06-08T17:02:28Z')) @book.instance_eval { @new_record = false } - @repository.identity_map(Book).set(@book.key, @book) + @repository.identity_map(Book).set(@book.key, @book) @book.title = "Mary Had a Little Lamb" end end it 'should do an HTTP PUT' do adapter = @repository.adapter #DataMapper::Repository.adapters[:default] adapter.should_receive(:http_put).with('/books/42.xml', @book.to_xml) - @repository.scope do + @repository.scope do @book.save end end end -end \ No newline at end of file +end