org.jruby.util
Class JRubyThreadContextTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.jruby.util.JRubyThreadContextTest
All Implemented Interfaces:
junit.framework.Test

public class JRubyThreadContextTest
extends junit.framework.TestCase

Test that the thread context classloader can be changed. There are two types of tests: runtime, and request. + runtime tests check that the context may change between different Ruby instances. + request tests check that the context may change between requests on the same Ruby instance. Currently per per request tests fail, as implementing a fix for this is much more difficult.


Constructor Summary
JRubyThreadContextTest()
           
 
Method Summary
protected  void setUp()
           
 void testRedefineClassPerRuntime()
          Checks if a class can be redefined between different Ruby instances.
 void testThreadContextPerRuntime()
          Check that the thread context can be different between Ruby instances
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, tearDown, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JRubyThreadContextTest

public JRubyThreadContextTest()
Method Detail

setUp

protected void setUp()
              throws java.lang.Exception
Overrides:
setUp in class junit.framework.TestCase
Throws:
java.lang.Exception

testThreadContextPerRuntime

public void testThreadContextPerRuntime()
Check that the thread context can be different between Ruby instances


testRedefineClassPerRuntime

public void testRedefineClassPerRuntime()
                                 throws java.lang.Exception
Checks if a class can be redefined between different Ruby instances.

Throws:
java.lang.Exception


Copyright © 2002-2007 JRuby Team. All Rights Reserved.