Sha256: f66fb274b43163c0ae06ea01566d95913cbd206fa70a6272eec93e39883cdec6
Contents?: true
Size: 379 Bytes
Versions: 13
Compression:
Stored size: 379 Bytes
Contents
require 'helper' describe Toy::Attributes do uses_constants('User') before do User.attribute(:name, String) User.attribute(:age, Integer) end it "prints out object id and attributes sorted with values" do user = User.new(:age => 28, :name => 'John') user.inspect.should == %Q(#<User:#{user.object_id} age: 28, id: "#{user.id}", name: "John">) end end
Version data entries
13 entries across 13 versions & 1 rubygems