Sha256: 42325b91dc19bc846c24d9364537f71daf341a575d1a563fa318f6dfc7d4a9fc
Contents?: true
Size: 591 Bytes
Versions: 27
Compression:
Stored size: 591 Bytes
Contents
require File.dirname(__FILE__) + '/../spec_helper' describe Tag do before(:each) do @tag = Tag.new @user = TaggableModel.create(:name => "Pablo") end it "should require a name" do @tag.should have(1).errors_on(:name) @tag.name = "something" @tag.should have(0).errors_on(:name) end it "should equal a tag with the same name" do @tag.name = "awesome" new_tag = Tag.new(:name => "awesome") new_tag.should == @tag end it "should return its name when to_s is called" do @tag.name = "cool" @tag.to_s.should == "cool" end end
Version data entries
27 entries across 27 versions & 8 rubygems