Sha256: cbebf42e0fa887eed26f2c22200bea1aeb8b3b52fae0cec63d7a4f39fdc5e976

Contents?: true

Size: 627 Bytes

Versions: 15

Compression:

Stored size: 627 Bytes

Contents

# -*- encoding: utf-8 -*-

require 'spec_helper'

describe Github::API, '#with' do
  let(:user) { 'peter-murach' }

  after { reset_authentication_for subject }

  context 'with hash' do
    it 'supports list of options' do
      subject.with(:user => user, :repo => 'github')
      subject.user.should == user
    end
  end

  context 'with string' do
    it 'support forward slash delimiter options' do
      subject.with('peter-murach/github')
      subject.user.should == user
    end

    it 'fails without slash delimiter' do
      expect { subject.with('peter-murach') }.to raise_error(ArgumentError)
    end
  end

end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
github_api-0.12.0 spec/github/api/with_spec.rb
github_api-0.11.3 spec/github/api/with_spec.rb
github_api-0.11.2 spec/github/api/with_spec.rb
github_api-0.11.1 spec/github/api/with_spec.rb
github_api-0.11.0 spec/github/api/with_spec.rb
github_api-0.10.2 spec/github/api/with_spec.rb
github_api-0.10.1 spec/github/api/with_spec.rb
github_api-0.10.0 spec/github/api/with_spec.rb
github_api-0.9.7 spec/github/api/with_spec.rb
github_api-0.9.6 spec/github/api/with_spec.rb
github_api-0.9.5 spec/github/api/with_spec.rb
github_api-0.9.4 spec/github/api/with_spec.rb
github_api-0.9.3 spec/github/api/with_spec.rb
github_api-0.9.2 spec/github/api/with_spec.rb
github_api-0.9.1 spec/github/api/with_spec.rb