Sha256: 563cac048524a8d838c63c3c7de3aeeedd2265ec6080a6718ce9fbaa0663c833

Contents?: true

Size: 884 Bytes

Versions: 4

Compression:

Stored size: 884 Bytes

Contents

$:.unshift File.dirname(__FILE__) + '/../lib'
require 'twurl'
require 'test/unit'
require 'rr'

class Test::Unit::TestCase
  include RR::Adapters::TestUnit
end

Twurl::RCFile.directory = ENV['TMPDIR']

module Twurl
  class Options
    class << self
      def test_exemplar
        options                 = new
        options.username        = 'exemplar_user_name'
        options.password        = 'secret'
        options.consumer_key    = '123456789'
        options.consumer_secret = '987654321'
        options.subcommands     = []
        options
      end
    end
  end

  class OAuthClient
    class << self
      def test_exemplar(overrides = {})
        options = Twurl::Options.test_exemplar

        overrides.each do |attribute, value|
          options.send("#{attribute}=", value)
        end

        load_new_client_from_options(options)
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
twurl-0.6.3 test/test_helper.rb
twurl-0.6.2 test/test_helper.rb
twurl-0.6.1 test/test_helper.rb
twurl-0.6.0 test/test_helper.rb