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.8.10 spec/github/deprecation_spec.rb
github_api-0.8.9 spec/github/deprecation_spec.rb
github_api-0.8.8 spec/github/deprecation_spec.rb
github_api-0.8.7 spec/github/deprecation_spec.rb
github_api-0.8.6 spec/github/deprecation_spec.rb
github_api-0.8.5 spec/github/deprecation_spec.rb
github_api-0.8.4 spec/github/deprecation_spec.rb
github_api-0.8.3 spec/github/deprecation_spec.rb
github_api-0.8.2 spec/github/deprecation_spec.rb
github_api-0.8.1 spec/github/deprecation_spec.rb
github_api-0.8.0 spec/github/deprecation_spec.rb
github_api-0.7.2 spec/github/deprecation_spec.rb
github_api-0.7.1 spec/github/deprecation_spec.rb
github_api-0.7.0 spec/github/deprecation_spec.rb
github_api-0.6.5 spec/github/deprecation_spec.rb
github_api-0.6.4 spec/github/deprecation_spec.rb
github_api-0.6.3 spec/github/deprecation_spec.rb
github_api-0.6.2 spec/github/deprecation_spec.rb
github_api-0.6.1 spec/github/deprecation_spec.rb
github_api-0.6.0 spec/github/deprecation_spec.rb