Sha256: 0c35e22b28cd32f335e416a263e7be2481ccceda92f10c73053edb9e5582d5d1

Contents?: true

Size: 478 Bytes

Versions: 1

Compression:

Stored size: 478 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

1 entries across 1 versions & 1 rubygems

Version Path
dm-tags-0.9.7 spec/dm-tags/tag_spec.rb