Sha256: ca3dd9b190a9090ae854126562b84e39b6185e9e7662bdf0dd7eb3a163b98978

Contents?: true

Size: 840 Bytes

Versions: 3

Compression:

Stored size: 840 Bytes

Contents

require 'rubygems'
require 'bundler/setup'
require 'rspec'

require 'json'
require 'rest-client'

require 'cradlepoint'

RSpec.configure do |config|
  config.color_enabled = true
end

USERNAME   ||= ENV['ECM_USERNAME']
PASSWORD   ||= ENV['ECM_PASSWORD']
ROUTER_ID  ||= ENV['ECM_ROUTER_ID']
ACCOUNT_ID ||= ENV['ECM_ACCOUNT_ID']
ROUTER_MAC ||= ENV['ECM_ROUTER_MAC']

unless USERNAME and PASSWORD and ROUTER_ID and ACCOUNT_ID
  raise 'REQUIRED ENV variables: [ECM_USERNAME, ECM_PASSWORD, ECM_ROUTER_ID, ECM_ACCOUNT_ID] in order to run the specs.'
end

def authenticate_with_valid_credentials(username = USERNAME, password = PASSWORD)
  Cradlepoint.authenticate(username, password)
end

alias :login :authenticate_with_valid_credentials

def logout
  Cradlepoint.username = nil
  Cradlepoint.password = nil
end

include Cradlepoint::HashHelpers

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
cradlepoint-0.2.0 spec/spec_helper.rb
cradlepoint-0.1.2 spec/spec_helper.rb
cradlepoint-0.1.1 spec/spec_helper.rb