Sha256: ab3e86fab0f05423d313e127d200caee44657a88f47d0f434cc63c7926519714

Contents?: true

Size: 1011 Bytes

Versions: 31

Compression:

Stored size: 1011 Bytes

Contents

require 'spec_helper'
require 'flapjack/data/entity'

describe Flapjack::Data::Tag, :redis => true do

  it "adds references to tags" do
    tags = Flapjack::Data::Tag.create('special', ['apple', 'button', 'carbon'], :redis => @redis)

    tags.should include('carbon')
    tags.should_not include('chocolate')

    tags.add('chocolate')
    tags.should include('chocolate')
  end

  it "deletes references from tags" do
    tags = Flapjack::Data::Tag.create('special', ['apple', 'button', 'carbon'], :redis => @redis)

    tags.should include('apple')
    tags.should include('button')

    tags.delete('button')
    tags.should include('apple')
    tags.should_not include('button')
  end

  it "lists references contained in a tag" do
    t1 = Flapjack::Data::Tag.create('special', ['apple', 'button', 'carbon'], :redis => @redis)

    t2 = Flapjack::Data::Tag.find('special', :redis => @redis)
    t2.should include('apple')
    t2.should include('carbon')
    t2.should_not include('chocolate')
  end

end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
flapjack-0.7.20 spec/lib/flapjack/data/tag_spec.rb
flapjack-0.7.19 spec/lib/flapjack/data/tag_spec.rb
flapjack-0.7.18 spec/lib/flapjack/data/tag_spec.rb
flapjack-0.7.17 spec/lib/flapjack/data/tag_spec.rb
flapjack-0.7.16 spec/lib/flapjack/data/tag_spec.rb
flapjack-0.7.15 spec/lib/flapjack/data/tag_spec.rb
flapjack-0.7.14 spec/lib/flapjack/data/tag_spec.rb
flapjack-0.7.13 spec/lib/flapjack/data/tag_spec.rb
flapjack-0.7.12 spec/lib/flapjack/data/tag_spec.rb
flapjack-0.7.11 spec/lib/flapjack/data/tag_spec.rb
flapjack-0.7.10 spec/lib/flapjack/data/tag_spec.rb
flapjack-0.7.9 spec/lib/flapjack/data/tag_spec.rb
flapjack-0.7.8 spec/lib/flapjack/data/tag_spec.rb
flapjack-0.7.7 spec/lib/flapjack/data/tag_spec.rb
flapjack-0.7.6 spec/lib/flapjack/data/tag_spec.rb
flapjack-0.7.5 spec/lib/flapjack/data/tag_spec.rb
flapjack-0.7.4 spec/lib/flapjack/data/tag_spec.rb
flapjack-0.7.3 spec/lib/flapjack/data/tag_spec.rb
flapjack-0.7.2 spec/lib/flapjack/data/tag_spec.rb
flapjack-0.7.1 spec/lib/flapjack/data/tag_spec.rb