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.12.3 spec/github/deprecation_spec.rb
github_api-0.12.2 spec/github/deprecation_spec.rb
github_api-0.12.1 spec/github/deprecation_spec.rb
github_api-0.12.0 spec/github/deprecation_spec.rb
github_api-0.11.3 spec/github/deprecation_spec.rb
github_api-0.11.2 spec/github/deprecation_spec.rb
github_api-0.11.1 spec/github/deprecation_spec.rb
github_api-0.11.0 spec/github/deprecation_spec.rb
github_api-0.10.2 spec/github/deprecation_spec.rb
github_api-0.10.1 spec/github/deprecation_spec.rb
github_api-0.10.0 spec/github/deprecation_spec.rb
github_api-0.9.7 spec/github/deprecation_spec.rb
github_api-0.9.6 spec/github/deprecation_spec.rb
github_api-0.9.5 spec/github/deprecation_spec.rb
github_api-0.9.4 spec/github/deprecation_spec.rb
github_api-0.9.3 spec/github/deprecation_spec.rb
github_api-0.9.2 spec/github/deprecation_spec.rb
github_api-0.9.1 spec/github/deprecation_spec.rb
github_api-0.9.0 spec/github/deprecation_spec.rb
github_api-0.8.11 spec/github/deprecation_spec.rb