Sha256: 9ba7aa5d898eb1f2554a33e8e1ee7613af50d6b9a6e82249794a34c6712a7674

Contents?: true

Size: 1.19 KB

Versions: 14

Compression:

Stored size: 1.19 KB

Contents

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

describe Highrise::Subject do

  before(:each) do
    @subject = Highrise::Subject.new
  end
  
  it "should be instance of Highrise::Base" do
    @subject.kind_of?(Highrise::Base).should be_true
  end
  
  describe ".notes" do

    it "should delegate to Highrise::Note with correct params" do
      @subject.should_receive(:id).and_return(1)
      Highrise::Note.should_receive(:find_all_across_pages).with({:from=>"/subjects/1/notes.xml"}).and_return("notes")
      @subject.notes.should == "notes"
    end

  end

  describe ".emails" do

    it "should delegate to Highrise::Email with correct params" do
      @subject.should_receive(:id).and_return(1)
      Highrise::Email.should_receive(:find_all_across_pages).with({:from=>"/subjects/1/emails.xml"}).and_return("emails")
      @subject.emails.should == "emails"
    end

  end
  
  describe ".upcoming_tasks" do

    it "should delegate to Highrise::Task with correct params" do
      @subject.should_receive(:id).and_return(1)
      Highrise::Task.should_receive(:find).with(:all, {:from=>"/subjects/1/tasks.xml"}).and_return("tasks")
      @subject.upcoming_tasks.should == "tasks"
    end

  end

end

Version data entries

14 entries across 14 versions & 3 rubygems

Version Path
kmayer-highrise-0.11.0 spec/highrise/subject_spec.rb
kmayer-highrise-0.11.1 spec/highrise/subject_spec.rb
kmayer-highrise-0.12.0 spec/highrise/subject_spec.rb
kmayer-highrise-0.13.0 spec/highrise/subject_spec.rb
kmayer-highrise-0.8.0 spec/highrise/subject_spec.rb
kmayer-highrise-0.8.1 spec/highrise/subject_spec.rb
kmayer-highrise-0.9.0 spec/highrise/subject_spec.rb
kmayer-highrise-0.9.1 spec/highrise/subject_spec.rb
kmayer-highrise-0.9.2 spec/highrise/subject_spec.rb
kmayer-highrise-1.0.1 spec/highrise/subject_spec.rb
soleone-highrise-0.13.3 spec/highrise/subject_spec.rb
highrise-1.0.4 spec/highrise/subject_spec.rb
highrise-1.0.3 spec/highrise/subject_spec.rb
highrise-1.0.2 spec/highrise/subject_spec.rb