Skip to content

Instantly share code, notes, and snippets.

@wycats
Created September 2, 2008 09:00
Show Gist options
  • Save wycats/8396 to your computer and use it in GitHub Desktop.
Save wycats/8396 to your computer and use it in GitHub Desktop.
it 'should typecast Hash for a Date property' do
Zoo.class_eval { property :date, Date }
zoo = Zoo.new
zoo.date = {:year => 2002, "month" => 1, :day => 1}
zoo.date.should == Date.new(2002, 1, 1)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment