Sha256: 7e6a289ca0dbea971e54b97882abf5de5006a41f9e2b70b936ee7e3fd3c92279

Contents?: true

Size: 314 Bytes

Versions: 11

Compression:

Stored size: 314 Bytes

Contents

require 'spec_helper'

class Drink
  include CouchPotato::Persistence
  
  property :alcohol
end

describe "json module" do
  it "should inject JSON.create_id into hash representation of a persistence object" do
    sake = Drink.new(:alcohol => "18%")
    sake.to_hash[JSON.create_id].should eql("Drink")
  end
end

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
davber_couch_potato-0.4.0 spec/unit/json_create_id_spec.rb
couch_potato-0.4.0 spec/unit/json_create_id_spec.rb
couch_potato-0.3.2 spec/unit/json_create_id_spec.rb
couch_potato-0.3.1 spec/unit/json_create_id_spec.rb
davber_couch_potato-0.3.0 spec/unit/json_create_id_spec.rb
couch_potato-0.3.0 spec/unit/json_create_id_spec.rb
couch_potato-0.2.32 spec/unit/json_create_id_spec.rb
couch_potato-0.2.31 spec/unit/json_create_id_spec.rb
couch_potato-0.2.30 spec/unit/json_create_id_spec.rb
couch_potato-0.2.29 spec/unit/json_create_id_spec.rb
couch_potato-0.2.28 spec/unit/json_create_id_spec.rb