Sha256: e780b379465a117e3c56ab7d3847640a60692715662b5c5d7e5a43904a79d9be

Contents?: true

Size: 664 Bytes

Versions: 6

Compression:

Stored size: 664 Bytes

Contents

require File.dirname(__FILE__) + '/../spec_helper'

describe Highrise::Tag do

  before(:each) do
    Highrise::Base.site = 'http://example.com.i/'
    @tag = Highrise::Tag.new(:id => 1, :name => "Name")
  end
  
  it "should be instance of Highrise::Base" do
    @tag.kind_of?(Highrise::Base).should be_true
  end

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

Version data entries

6 entries across 6 versions & 3 rubygems

Version Path
kmayer-highrise-0.13.0 spec/highrise/tag_spec.rb
kmayer-highrise-1.0.1 spec/highrise/tag_spec.rb
soleone-highrise-0.13.3 spec/highrise/tag_spec.rb
highrise-1.0.4 spec/highrise/tag_spec.rb
highrise-1.0.3 spec/highrise/tag_spec.rb
highrise-1.0.2 spec/highrise/tag_spec.rb