Sha256: 90625b7f1db0063a57269bc999c856efa7c68a4b8b92d7b1f7d0b9e8d1a317f8

Contents?: true

Size: 343 Bytes

Versions: 15

Compression:

Stored size: 343 Bytes

Contents

require File.dirname(__FILE__) + '/../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

15 entries across 15 versions & 1 rubygems

Version Path
couch_potato-0.2.27 spec/unit/json_create_id_spec.rb
couch_potato-0.2.26 spec/unit/json_create_id_spec.rb
couch_potato-0.2.25 spec/unit/json_create_id_spec.rb
couch_potato-0.2.24 spec/unit/json_create_id_spec.rb
couch_potato-0.2.23 spec/unit/json_create_id_spec.rb
couch_potato-0.2.22 spec/unit/json_create_id_spec.rb
couch_potato-0.2.21 spec/unit/json_create_id_spec.rb
couch_potato-0.2.20 spec/unit/json_create_id_spec.rb
couch_potato-0.2.19 spec/unit/json_create_id_spec.rb
couch_potato-0.2.18 spec/unit/json_create_id_spec.rb
couch_potato-0.2.17 spec/unit/json_create_id_spec.rb
couch_potato-0.2.16 spec/unit/json_create_id_spec.rb
couch_potato-0.2.15 spec/unit/json_create_id_spec.rb
couch_potato-0.2.14 spec/unit/json_create_id_spec.rb
couch_potato-0.2.13 spec/unit/json_create_id_spec.rb