Sha256: 64e4d4022fbb317deebbc8187ac853cbed0fac7771f8ead02db89020d1facd9a
Contents?: true
Size: 1.05 KB
Versions: 7
Compression:
Stored size: 1.05 KB
Contents
require File.expand_path(File.join(File.dirname(__FILE__), "/../../helper")) module Johnson module SpiderMonkey class RuntimeTest < Johnson::TestCase def setup @runtime = Johnson::SpiderMonkey::Runtime.new end def test_can_create_more_than_one_without_barfing assert_nothing_raised { Johnson::SpiderMonkey::Runtime.new } end def test_default_is_no_debugger assert_equal false, @runtime.debugger? end def test_only_accepts_real_debugger_instance assert_raises(TypeError) { @runtime.debugger = 17 } assert_raises(TypeError) { @runtime.debugger = "Yes please!" } assert_raises(TypeError) { @runtime.debugger = Object.new } assert_raises(TypeError) { @runtime.debugger = @runtime } end def test_reports_a_debugger_is_registered @runtime.debugger = Johnson::SpiderMonkey::Debugger.new(nil) assert @runtime.debugger? end end end end
Version data entries
7 entries across 7 versions & 2 rubygems