Sha256: 7e15a15ef2815ba6a359b9dcfc9fcb77b1697927888cdf352f0dd070b21c98df
Contents?: true
Size: 739 Bytes
Versions: 1
Compression:
Stored size: 739 Bytes
Contents
shared_examples_for "a taggable class" do before(:each) do (@tags = []).tap do @tags << Highrise::Tag.new(:name => "cliente", :id => 414578) @tags << Highrise::Tag.new(:name => "ged", :id => 414580) @tags << Highrise::Tag.new(:name => "iepc", :id => 414579) end end it { subject.class.included_modules.should include(Highrise::Taggable) } it "#tag!(tag_name)" do subject.should_receive(:post).with(:tags, :name => "client" ).and_return(true) subject.tag!("client").should be_true end it "#untag!(tag_name)" do subject.should_receive(:tags).and_return(@tags) subject.should_receive(:delete).with("tags/414578").and_return(true) subject.untag!("cliente").should be_true end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
highrise-3.2.3 | spec/highrise/taggable_behavior.rb |