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

Version Path
toystore-0.8.3 spec/toy/inspect_spec.rb
toystore-0.8.2 spec/toy/inspect_spec.rb
toystore-0.8.1 spec/toy/inspect_spec.rb
toystore-0.8.0 spec/toy/inspect_spec.rb
toystore-0.7.0 spec/toy/inspect_spec.rb
toystore-0.6.6 spec/toy/inspect_spec.rb
toystore-0.6.5 spec/toy/inspect_spec.rb
toystore-0.6.4 spec/toy/inspect_spec.rb
toystore-0.6.3 spec/toy/inspect_spec.rb
toystore-0.6.2 spec/toy/inspect_spec.rb
toystore-0.6.1 spec/toy/inspect_spec.rb
toystore-0.6 spec/toy/inspect_spec.rb
toystore-0.5 spec/toy/inspect_spec.rb