Sha256: 1f4b8945c97dc18467125dae060d5b0cddfb293c7464f5c9a573537fa0bbce19

Contents?: true

Size: 671 Bytes

Versions: 14

Compression:

Stored size: 671 Bytes

Contents

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

require 'spec_helper'

describe Github::API, '#set' do

  after { reset_authentication_for subject }

  it 'requires value to be set' do
    expect { subject.set :option }.to raise_error(ArgumentError)
  end

  context 'accpets more than one option' do
    before { subject.set :user => 'user-name', :repo => 'repo-name' }

    it 'sets user' do
      subject.user.should == 'user-name'
    end

    it 'sets repo' do
      subject.repo.should == 'repo-name'
    end
  end

  context 'defines accessors' do
    before { subject.set :branch, 'arguments' }

    it { should respond_to :branch }

    it { should respond_to 'branch=' }
  end

end

Version data entries

14 entries across 14 versions & 1 rubygems

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