diff options
-rw-r--r-- | test/test.rb | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/test/test.rb b/test/test.rb index db6a0de..3fd1597 100644 --- a/test/test.rb +++ b/test/test.rb @@ -66,11 +66,14 @@ describe MethodSource do method(:hello).comment.should == @hello_comment end - it 'should return source for an *_evaled method' do - M.method(:hello_name).source.should == @hello_instance_evaled_source - M.method(:name_two).source.should == @hello_instance_evaled_source_2 - M.instance_method(:hello_name).source.should == @hello_class_evaled_source - M.instance_method(:hi_name).source.should == @hi_module_evaled_source + # These tests fail because of http://jira.codehaus.org/browse/JRUBY-4576 + unless defined?(RUBY_ENGINE) && RUBY_ENGINE == "jruby" + it 'should return source for an *_evaled method' do + M.method(:hello_name).source.should == @hello_instance_evaled_source + M.method(:name_two).source.should == @hello_instance_evaled_source_2 + M.instance_method(:hello_name).source.should == @hello_class_evaled_source + M.instance_method(:hi_name).source.should == @hi_module_evaled_source + end end it "should raise error for evaled methods that do not pass __FILE__ and __LINE__ + 1 as its arguments" do |