Sha256: b6e04c2d3d565b1ae40c326e65296599e3ab71eb6184a30781247a6d8b1a7dfc
Contents?: true
Size: 522 Bytes
Versions: 2
Compression:
Stored size: 522 Bytes
Contents
require 'helper' describe Toy::Object do uses_objects('User') subject { User.new } it_should_behave_like 'ActiveModel' it "adds model naming" do model_name = User.model_name model_name.should == 'User' model_name.singular.should == 'user' model_name.plural.should == 'users' end it "adds to_model" do user = User.new user.to_model.should == user end describe "#persisted?" do it "returns false" do User.new.persisted?.should be_false end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
toystore-0.13.2 | spec/toy/object_spec.rb |
toystore-0.13.1 | spec/toy/object_spec.rb |