Sha256: 43765dff297a66ccd3228e878a9f05f2b49bc87f179460a459a3b26ce0866666

Contents?: true

Size: 498 Bytes

Versions: 19

Compression:

Stored size: 498 Bytes

Contents

require 'spec_helper'

describe Highrise::Tag do
  subject { Highrise::Tag.new(:id => 1, :name => "Name") }
  
  it { should be_a_kind_of Highrise::Base }

  it "supports equality" do
    tag = Highrise::Tag.new(:id => 1, :name => "Name")
    subject.should == tag
  end
  
  it ".find_by_name" do
    tag = Highrise::Tag.new(:id => 2, :name => "Next")
    Highrise::Tag.should_receive(:find).with(:all).and_return([tag, subject])
    Highrise::Tag.find_by_name("Name").should == subject
  end
end

Version data entries

19 entries across 19 versions & 2 rubygems

Version Path
highrise-3.2.3 spec/highrise/tag_spec.rb
highrise-3.2.1 spec/highrise/tag_spec.rb
highrise-3.1.6 spec/highrise/tag_spec.rb
highrise-3.1.5 spec/highrise/tag_spec.rb
highrise-3.1.2 spec/highrise/tag_spec.rb
highrise-3.1.1 spec/highrise/tag_spec.rb
highrise-3.1.0 spec/highrise/tag_spec.rb
highrise-3.1.0.pre spec/highrise/tag_spec.rb
highrise-3.0.5 spec/highrise/tag_spec.rb
highrise-3.0.4 spec/highrise/tag_spec.rb
highrise-3.0.3 spec/highrise/tag_spec.rb
peterosullivan-highrise-3.0.7 spec/highrise/tag_spec.rb
peterosullivan-highrise-3.0.6 spec/highrise/tag_spec.rb
peterosullivan-highrise-3.0.5 spec/highrise/tag_spec.rb
peterosullivan-highrise-3.0.4 spec/highrise/tag_spec.rb
peterosullivan-highrise-3.0.3 spec/highrise/tag_spec.rb
peterosullivan-highrise-3.0.2 spec/highrise/tag_spec.rb
highrise-3.0.1 spec/highrise/tag_spec.rb
highrise-3.0.0 spec/highrise/tag_spec.rb