Sha256: 75cc538826a4858ec018e21d7de700ef0b3dfbcce51817be2f5e3e53c65f732e

Contents?: true

Size: 483 Bytes

Versions: 2

Compression:

Stored size: 483 Bytes

Contents

require File.dirname(__FILE__) + '/../spec_helper.rb'

describe Tag do
  before(:each) do
    @tag = Tag.new
  end
  
  it "should have id and name properties" do
    @tag.attributes.should have_key(:id)
    @tag.attributes.should have_key(:name)
  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
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
dm-tags-0.0.2 spec/dm-tags/tag_spec.rb
dm-tags-0.0.3 spec/dm-tags/tag_spec.rb