Merge remote branch 'tapajos/master'

Conflicts:
	README.md
	lib/couchrest/mixins/properties.rb
	spec/couchrest/core/database_spec.rb
	spec/couchrest/more/extended_doc_spec.rb
This commit is contained in:
Tapajós 2009-09-20 22:52:39 -03:00
commit 2f2c507582
11 changed files with 47 additions and 11 deletions

View file

@ -133,14 +133,17 @@ describe "ExtendedDocument properties" do
describe "casting" do
describe "cast keys to any type" do
before(:all) do
event_doc = { :subject => "Some event", :occurs_at => Time.now }
event_doc = { :subject => "Some event", :occurs_at => Time.now, :end_date => Date.today }
e = Event.database.save_doc event_doc
@event = Event.get e['id']
end
it "should cast created_at to Time" do
it "should cast occurs_at to Time" do
@event['occurs_at'].should be_an_instance_of(Time)
end
it "should cast end_date to Date" do
@event['end_date'].should be_an_instance_of(Date)
end
end
describe "casting to Float object" do