| | 975 | class TraversalTests < Test::Unit::TestCase |
|---|
| | 976 | class Request |
|---|
| | 977 | attr_accessor :path, :path_parameters |
|---|
| | 978 | |
|---|
| | 979 | def initialize(path) |
|---|
| | 980 | @path = path |
|---|
| | 981 | @path_parmeters = {} |
|---|
| | 982 | end |
|---|
| | 983 | end |
|---|
| | 984 | |
|---|
| | 985 | def test_invalid_module |
|---|
| | 986 | assert !Object.const_defined?("Profiler__"), "Profiler should not be loaded" |
|---|
| | 987 | |
|---|
| | 988 | request = Request.new("/profile") |
|---|
| | 989 | begin |
|---|
| | 990 | ActionController::Routing::Routes.recognize!(request) |
|---|
| | 991 | rescue ActionController::RoutingError |
|---|
| | 992 | end |
|---|
| | 993 | |
|---|
| | 994 | assert !Object.const_defined?("Profiler__"), "Profiler should not be loaded" |
|---|
| | 995 | end |
|---|