Sha256: 91ae582abbad3a1f515ebb568c8e8098412d97791a997bd6c53cb908a6d3eae6
Contents?: true
Size: 1.28 KB
Versions: 14
Compression:
Stored size: 1.28 KB
Contents
# $LOAD_PATH << File.dirname(__FILE__) # # require Pathname(__FILE__).dirname.expand_path.parent + 'spec_helper' # # describe 'A Persevere adapter' do # # describe 'when updating an existing resource' do # # before do # # @books_xml = <<-XML # # <book> # # <id type='integer'>42</id> # # <title>Starship Troopers</title> # # <author>Robert Heinlein</author> # # <created-at type='datetime'>2008-06-08T17:02:28Z</created-at> # # </book> # # XML # # repository do |repo| # # @repository = repo # # @book = Book.new(:id => 42, # # :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)[@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 # # @book.save # # end # # end # end # end
Version data entries
14 entries across 14 versions & 1 rubygems