Sha256: 1230e86fb5ba7ea5d3384117c39eae22f4155da023a3a52b9110254d03a7fb41

Contents?: true

Size: 980 Bytes

Versions: 74

Compression:

Stored size: 980 Bytes

Contents

require 'support/test_app'

module ApiHelper
  def app_id
    TestApp.instance.app_id
  end

  def key_name
    TestApp.instance.key_name
  end

  def key_secret
    TestApp.instance.key_secret
  end

  def api_key
    TestApp.instance.api_key
  end

  def restricted_api_key
    TestApp.instance.restricted_api_key
  end

  def environment
    TestApp.instance.environment
  end

  def reload_test_app
    WebMock.disable!
    TestApp.reload
  end

  def encode64(text)
    Base64.encode64(text).gsub("\n", '')
  end
end

RSpec.configure do |config|
  config.include ApiHelper

  config.before(:suite) do
    WebMock.disable!
  end

  config.after(:suite) do
    WebMock.disable!
    TestApp.instance.delete if TestApp.instance_variable_get('@singleton__instance__')
  end
end

module ApiPreloader
  def self.included(mod)
    WebMock.disable!
    TestApp.instance.api_key
  end

  RSpec.configure do |config|
    config.include self, :file_path => %r(spec/acceptance)
  end
end

Version data entries

74 entries across 74 versions & 2 rubygems

Version Path
ably-rest-1.1.5 lib/submodules/ably-ruby/spec/support/api_helper.rb
ably-1.1.5 spec/support/api_helper.rb
ably-rest-1.1.4 lib/submodules/ably-ruby/spec/support/api_helper.rb
ably-1.1.4 spec/support/api_helper.rb
ably-rest-1.1.4.rc lib/submodules/ably-ruby/spec/support/api_helper.rb
ably-1.1.4.rc spec/support/api_helper.rb
ably-rest-1.1.3 lib/submodules/ably-ruby/spec/support/api_helper.rb
ably-1.1.3 spec/support/api_helper.rb
ably-rest-1.1.2 lib/submodules/ably-ruby/spec/support/api_helper.rb
ably-1.1.2 spec/support/api_helper.rb
ably-rest-1.1.2.rc1 lib/submodules/ably-ruby/spec/support/api_helper.rb
ably-1.1.1 spec/support/api_helper.rb
ably-rest-1.1.0 lib/submodules/ably-ruby/spec/support/api_helper.rb
ably-1.1.0 spec/support/api_helper.rb
ably-1.0.7 spec/support/api_helper.rb
ably-rest-1.0.6 lib/submodules/ably-ruby/spec/support/api_helper.rb
ably-1.0.6 spec/support/api_helper.rb
ably-rest-1.0.5 lib/submodules/ably-ruby/spec/support/api_helper.rb
ably-1.0.5 spec/support/api_helper.rb
ably-1.0.4 spec/support/api_helper.rb