Sha256: 19313d3928bb4126120a33896dfb3ad8a34aa96363940032df15e7709b60bbe1
Contents?: true
Size: 1012 Bytes
Versions: 20
Compression:
Stored size: 1012 Bytes
Contents
require "test_helper" require "jstdutil/jstestdriver/config" class JsTestDriverConfigTest < Test::Unit::TestCase context "creating JsTestDriverConfig instances" do setup do @file = "__jstd.conf" @server = "http://localhost:4242" File.open(@file, "w") { |f| f.puts "server: #{@server}" } end teardown do File.delete(@file) if File.exists?(@file) end should "work from existing file" do config = nil assert_nothing_raised do config = Jstdutil::JsTestDriver::Config.new @file end assert_equal @server, config.server end should "work from string config" do config = nil assert_nothing_raised do config = Jstdutil::JsTestDriver::Config.new "server: #{@server}" end assert_equal @server, config.server end should "raise error if no valid configuration is provided" do assert_raise ArgumentError do Jstdutil::JsTestDriver::Config.new "bogus" end end end end
Version data entries
20 entries across 20 versions & 1 rubygems