Sha256: 110be069c57a6f4a08126a289b3dae36a0137a30c836bd8d30a72b8113feab20

Contents?: true

Size: 695 Bytes

Versions: 51

Compression:

Stored size: 695 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe Github do
  let(:method) { 'create_repos'}
  let(:alt_method) { 'repos.create'}

  it { described_class.constants.should include :DEPRECATION_PREFIX }

  context '.deprecate' do
    before do
      Github.deprecation_tracker = []
    end

    it 'tracks messages' do
      Github.should_receive(:warn).once()
      Github.deprecate(method)
      Github.deprecate(method)
    end

    it 'prints the message through Kernel' do
      Github.should_receive(:warn).once()
      Github.deprecate method
    end
  end

  it 'prints the message through Kernel' do
    Github.should_receive(:warn)
    Github.warn_deprecation method
  end
end # Github

Version data entries

51 entries across 51 versions & 1 rubygems

Version Path
github_api-0.5.4 spec/github/deprecation_spec.rb
github_api-0.5.3 spec/github/deprecation_spec.rb
github_api-0.5.2 spec/github/deprecation_spec.rb
github_api-0.5.1 spec/github/deprecation_spec.rb
github_api-0.5.0 spec/github/deprecation_spec.rb
github_api-0.5.0.rc1 spec/github/deprecation_spec.rb
github_api-0.4.11 spec/github/deprecation_spec.rb
github_api-0.4.10 spec/github/deprecation_spec.rb
github_api-0.4.9 spec/github/deprecation_spec.rb
github_api-0.4.8 spec/github/deprecation_spec.rb
github_api-0.4.7 spec/github/deprecation_spec.rb