Sha256: 15997fba40669166fd6a15c7b51008c1244df5378baaf060685ee38f2fb694de

Contents?: true

Size: 663 Bytes

Versions: 6

Compression:

Stored size: 663 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 & 2 rubygems

Version Path
rogerio-augusto-highrise-2.0.4 spec/highrise/tag_spec.rb
rogerio-augusto-highrise-2.0.3 spec/highrise/tag_spec.rb
rogerio-augusto-highrise-2.0.2 spec/highrise/tag_spec.rb
highrise-2.0.1 spec/highrise/tag_spec.rb
highrise-2.0.0 spec/highrise/tag_spec.rb
highrise-1.2.0 spec/highrise/tag_spec.rb