Sha256: d426e7841798f42df6ca64431b9123528f2317ac867dcc2a5e73c6fd4eb39fb4

Contents?: true

Size: 506 Bytes

Versions: 3

Compression:

Stored size: 506 Bytes

Contents

require 'pathname'
require Pathname(__FILE__).dirname.expand_path.parent + 'spec_helper'

describe Tag do
  before 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

3 entries across 3 versions & 1 rubygems

Version Path
dm-tags-0.9.10 spec/dm-tags/tag_spec.rb
dm-tags-0.9.8 spec/dm-tags/tag_spec.rb
dm-tags-0.9.9 spec/dm-tags/tag_spec.rb