Sha256: f26d0157e6e613791891db67e57f969b481e86baa16ca13c7c8fd57ab4b5857f
Contents?: true
Size: 561 Bytes
Versions: 7
Compression:
Stored size: 561 Bytes
Contents
require 'spec_helper' describe Tag do before do @tag = Tag.new end it "should have many Taggings" do Tag.relationships.should have_key(:taggings) end it "should validate the presence of name" do @tag.should_not be_valid @tag.name = "Meme" @tag.should be_valid end it "should list taggables for a tag" do tag = Tag.create(:name => 'tag1') taggable1 = TaggedModel.create(:tag_list => tag.name) taggable2 = TaggedModel.create(:tag_list => tag.name) tag.taggables.should == [ taggable1, taggable2 ] end end
Version data entries
7 entries across 7 versions & 1 rubygems