Sha256: f0b7fc80676c67b10b248a92936d395588a28d5e3297faa720ee8751158cbe47

Contents?: true

Size: 821 Bytes

Versions: 3

Compression:

Stored size: 821 Bytes

Contents

require File.join(File.dirname(__FILE__), "/../spec_helper")

describe "EvernoteOAuth::BusinessNoteStore" do
  include EvernoteOAuth::BusinessNoteStore

  context "#initialize" do
    it "assigns instance variables" do
      business_note_store = EvernoteOAuth::BusinessNoteStore::Store.new(client: 'client')
      business_note_store.instance_variable_get(:@client).should == 'client'
    end
  end
  context "#method_missing" do
    it "dispatches method" do
      mock_client = mock(Object)
      mock_client.should_receive(:send).with(:call_method, 'args')
      mock_client.class.should_receive(:instance_method).with(:call_method).and_return{
        Proc.new {|a| a}
      }
      note_store = EvernoteOAuth::BusinessNoteStore::Store.new(client: mock_client)
      note_store.call_method('args')
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
evernote_oauth-0.2.2 spec/evernote_oauth/business_note_store_spec.rb
evernote_oauth-0.2.1 spec/evernote_oauth/business_note_store_spec.rb
evernote_oauth-0.2.0 spec/evernote_oauth/business_note_store_spec.rb