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-1.0.3 spec/support/api_helper.rb
ably-1.0.2 spec/support/api_helper.rb
ably-1.0.1 spec/support/api_helper.rb
ably-rest-1.0.0 lib/submodules/ably-ruby/spec/support/api_helper.rb
ably-1.0.0 spec/support/api_helper.rb
ably-rest-0.8.15 lib/submodules/ably-ruby/spec/support/api_helper.rb
ably-0.8.15 spec/support/api_helper.rb
ably-rest-0.9.3 lib/submodules/ably-ruby/spec/support/api_helper.rb
ably-rest-0.9.2 lib/submodules/ably-ruby/spec/support/api_helper.rb
ably-rest-0.9.1 lib/submodules/ably-ruby/spec/support/api_helper.rb
ably-rest-0.9.0 lib/submodules/ably-ruby/spec/support/api_helper.rb
ably-rest-0.8.14 lib/submodules/ably-ruby/spec/support/api_helper.rb
ably-0.8.14 spec/support/api_helper.rb
ably-rest-0.8.13 lib/submodules/ably-ruby/spec/support/api_helper.rb
ably-0.8.13 spec/support/api_helper.rb
ably-0.8.12 spec/support/api_helper.rb
ably-0.8.11 spec/support/api_helper.rb
ably-0.8.10 spec/support/api_helper.rb
ably-rest-0.8.9 lib/submodules/ably-ruby/spec/support/api_helper.rb
ably-0.8.9 spec/support/api_helper.rb