Sha256: a6fd5d595777449c13309df0b1f43240c9853986991f8e9d27504d9aadb1d344

Contents?: true

Size: 946 Bytes

Versions: 5

Compression:

Stored size: 946 Bytes

Contents

require "rubygems"
require "json"
require "rspec"
require 'webmock/rspec'

begin require "redgreen" unless ENV['TM_CURRENT_LINE']; rescue LoadError; end
path = File.expand_path(File.dirname(__FILE__) + "/../lib/")
$LOAD_PATH.unshift(path) unless $LOAD_PATH.include?(path)
require path + '/flexmls_api'

require 'flexmls_api'
require File.expand_path('../mock_helper', __FILE__)
require File.expand_path('../json_helper', __FILE__)


FileUtils.mkdir 'log' unless File.exists? 'log'

# TODO, really we should change the library to support configuration without overriding
module FlexmlsApi
  def self.logger
    if @logger.nil?
      @logger = Logger.new('log/test.log')
      @logger.level = Logger::DEBUG
    end
    @logger
  end
end

FlexmlsApi.logger.info("Setup gem for rspec testing")

def reset_config()
  FlexmlsApi.reset
  FlexmlsApi.configure do |config|
    config.api_user = "foobar"
  end
end
reset_config

include FlexmlsApi::Models

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
flexmls_api-0.7.3 spec/spec_helper.rb
flexmls_api-0.7.5 spec/spec_helper.rb
flexmls_api-0.7.0 spec/spec_helper.rb
flexmls_api-0.6.5 spec/spec_helper.rb
flexmls_api-0.6.4 spec/spec_helper.rb