Sha256: 716574979430a25f86ef13bc2aa3606b17fcd60255c8d5fe21f945c6aebea9a7

Contents?: true

Size: 624 Bytes

Versions: 1

Compression:

Stored size: 624 Bytes

Contents

require 'rubygems'
require 'yaml'
require 'test/unit'
require 'webmock'

include WebMock

# The base of all tests in this projet
# New Testcases need to look like this:
#
#
# class TestName < BaseTest
#  
#  def setup 
#    super
#    # implementation goes here
#  end
#  
# end
class BaseTest < Test::Unit::TestCase
  
  # reading config.yml and assign all keys to instance
  def read_config  
    yml_config = YAML.load_file(File.dirname(__FILE__) + "/config.yml")
    yml_config.each do |key, value| 
      instance_variable_set("@#{key}", value)
    end
  end
  
  # :nodoc:
  def setup
    self.read_config
  end
  
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
streambot-0.2.5 test/base_test.rb