Sha256: 3fb9c4d4afa617d3f14a784d8ef4dd953385fb8604e21d8f00ba1fea960eadfe

Contents?: true

Size: 494 Bytes

Versions: 9

Compression:

Stored size: 494 Bytes

Contents

require 'spec_helper'

describe FbGraph2::User do
  describe '.app' do
    let(:klass) { FbGraph2::App }

    it 'should not call API' do
      expect do
        app = klass.app 'token'
        app.should be_instance_of klass
      end.not_to request_to 'app'
    end

    context 'when fetched' do
      it 'should call API' do
        app = mock_graph :get, 'app', 'app/app' do
          klass.app('token').fetch
        end
        app.should be_instance_of klass
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
fb_graph2-0.1.2 spec/fb_graph2/application_spec.rb
fb_graph2-0.1.1 spec/fb_graph2/application_spec.rb
fb_graph2-0.1.0 spec/fb_graph2/application_spec.rb
fb_graph2-0.0.11 spec/fb_graph2/application_spec.rb
fb_graph2-0.0.10 spec/fb_graph2/application_spec.rb
fb_graph2-0.0.9 spec/fb_graph2/application_spec.rb
fb_graph2-0.0.8 spec/fb_graph2/application_spec.rb
fb_graph2-0.0.7 spec/fb_graph2/application_spec.rb
fb_graph2-0.0.6 spec/fb_graph2/application_spec.rb