Sha256: e8fffc58ead19afdc7eb4924f3768eb3cc23ae30a1bd483273d47ae4fee1820a
Contents?: true
Size: 834 Bytes
Versions: 16
Compression:
Stored size: 834 Bytes
Contents
shared_examples_for "a taggable class" do before(:each) do (@tags = []).tap do @tags << {'id' => "414578", 'name' => "cliente"} @tags << {'id' => "414580", 'name' => "ged"} @tags << {'id' => "414579", 'name' => "iepc"} end end it { subject.class.included_modules.should include(Highrise::Taggable) } it "#tags" do subject.should_receive(:get).with(:tags).and_return(@tags) subject.tags.should == @tags end 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(:get).with(: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
16 entries across 16 versions & 2 rubygems