Sha256: ea55ae365e6de0bd3317634f5fddf32266578d1a2355ac43c41bd8c6fe28b4ff

Contents?: true

Size: 412 Bytes

Versions: 2

Compression:

Stored size: 412 Bytes

Contents

require 'spec_helper'

describe 'Adding and removing tags' do
  let(:article)  { Article.create }
  let(:pancakes) { TagPanda::Tag.create :name => 'pancakes' }

  it "stores new tags" do
    article.tags << pancakes

    article.tags.reload.should == [pancakes]
  end

  it "removes existing tags" do
    article.tags << pancakes

    article.tags.delete pancakes

    article.tags.reload.should == []
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
tag_panda-0.1.0 spec/acceptance/tags_spec.rb
tag_panda-0.0.2 spec/acceptance/tags_spec.rb