Skip to content

Instantly share code, notes, and snippets.

@aycabta
Created September 14, 2016 16:25
Show Gist options
  • Save aycabta/4db6900a9cbd4f1cbd75f5dc33acf044 to your computer and use it in GitHub Desktop.
Save aycabta/4db6900a9cbd4f1cbd75f5dc33acf044 to your computer and use it in GitHub Desktop.
aycabta@x250:~/rcodetools$ rake
/home/aycabta/.rbenv/versions/2.3.1/bin/ruby -w -I"lib:ext/rcovrt" -I"/home/aycabta/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rake-11.2.2/lib" "/home/aycabta/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rake-11.2.2/lib/rake/rake_test_loader.rb" "test/test_completion.rb" "test/test_doc.rb" "test/test_functional.rb" "test/test_method_analyzer.rb" "test/test_method_args.rb" "test/test_options.rb" "test/test_ruby_toggle_file.rb" "test/test_xmpfilter.rb" "test/test_xmptestunitfilter.rb"
test/test_completion.rb
test/test_doc.rb
test/test_functional.rb
test/test_method_analyzer.rb
test/test_method_args.rb
test/test_options.rb
test/test_ruby_toggle_file.rb
test/test_xmpfilter.rb
test/test_xmptestunitfilter.rb
/home/aycabta/rcodetools/test/test_completion.rb:391: warning: mismatched indentations at 'end' with 'def' at 386
/home/aycabta/rcodetools/lib/rcodetools/completion.rb:160: warning: assigned but unused variable - stdout
/home/aycabta/rcodetools/lib/rcodetools/completion.rb:182: warning: assigned but unused variable - code
/home/aycabta/rcodetools/lib/rcodetools/xmpfilter.rb:155: warning: shadowing outer local variable - s
/home/aycabta/rcodetools/lib/rcodetools/xmpfilter.rb:8: warning: setting Encoding.default_external
/home/aycabta/rcodetools/test/test_doc.rb:344: warning: mismatched indentations at 'end' with 'def' at 339
/home/aycabta/rcodetools/lib/rcodetools/doc.rb:28: warning: assigned but unused variable - recv
/home/aycabta/rcodetools/lib/rcodetools/doc.rb:52: warning: assigned but unused variable - klass
/home/aycabta/rcodetools/lib/rcodetools/doc.rb:53: warning: assigned but unused variable - flag
/home/aycabta/rcodetools/lib/rcodetools/doc.rb:54: warning: assigned but unused variable - which_methods
/home/aycabta/rcodetools/lib/rcodetools/doc.rb:55: warning: assigned but unused variable - ancestor_class
/home/aycabta/rcodetools/test/test_method_analyzer.rb:82: warning: assigned but unused variable - a
/home/aycabta/rcodetools/test/test_method_analyzer.rb:98: warning: assigned but unused variable - b
/home/aycabta/rcodetools/lib/method_analyzer.rb:38:in `trace_func': undefined method `critical' for Thread:Class (NoMethodError)
/home/aycabta/rcodetools/test/test_method_analyzer.rb:92: warning: method redefined; discarding old test_marshal_merged
/home/aycabta/rcodetools/test/test_method_analyzer.rb:77: warning: previous definition of test_marshal_merged was here
/home/aycabta/rcodetools/test/test_method_args.rb:78: warning: assigned but unused variable - file
/home/aycabta/rcodetools/test/test_method_args.rb:78: warning: assigned but unused variable - lineno
/home/aycabta/.rbenv/versions/2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- rcodetools/options (LoadError)
from /home/aycabta/.rbenv/versions/2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /home/aycabta/rcodetools/test/../bin/rct-meth-args:8:in `<main>'
/home/aycabta/.rbenv/versions/2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- rcodetools/options (LoadError)
from /home/aycabta/.rbenv/versions/2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /home/aycabta/rcodetools/test/../bin/rct-meth-args:8:in `<main>'
Loaded suite /home/aycabta/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rake-11.2.2/lib/rake/rake_test_loader
Started
N
=============================================================================================================================================================================================================================================
MethodAnalyzerMarshalOutput#test_marshal_merged was redefined [test_marshal_merged(MethodAnalyzerMarshalOutput)]
/home/aycabta/rcodetools/test/test_method_analyzer.rb:92:in `<class:MethodAnalyzerMarshalOutput>'
=============================================================================================================================================================================================================================================
/home/aycabta/rcodetools/lib/method_analyzer.rb:38:in `trace_func': undefined method `critical' for Thread:Class (NoMethodError)
E
=============================================================================================================================================================================================================================================
Error: test_marshal_merged(MethodAnalyzerMarshalOutput): NoMethodError: undefined method `[]' for nil:NilClass
/home/aycabta/rcodetools/test/test_method_analyzer.rb:101:in `test_marshal_merged'
98: b = write_temp_file "[].empty?", "mergeB.rb"
99: system "ruby -r#{SCRIPT} mergeB.rb"
100: method_analysis = Marshal.load(File.read(METHOD_ANALYSIS))
=> 101: assert_equal ["Array#empty?"], method_analysis[File.join(DIR, "mergeB.rb")][1]
102: ensure
103: ENV.delete 'METHOD_ANALYZER_FORMAT'
104: Dir.chdir @pwd
=============================================================================================================================================================================================================================================
F
=============================================================================================================================================================================================================================================
Failure: test_plain_definitions(MethodAnalyzerTextOutput)
/home/aycabta/rcodetools/test/test_method_analyzer.rb:60:in `test_plain_definitions'
57: end
58:
59: def test_plain_definitions
=> 60: assert_equal @@definitions_expected, @@definitions_actual
61: end
62:
63: end
<"method definitions\nmethod_analyzer-data.rb:3:A.foo\nmethod_analyzer-data.rb:7:A#a\nmethod_analyzer-data.rb:12:B#initialize\nmethod_analyzer-data.rb:16:B#b\n">(UTF-8) expected but was
<"method definitions\n">(ASCII-8BIT)
diff:
method definitions
- method_analyzer-data.rb:3:A.foo
- method_analyzer-data.rb:7:A#a
- method_analyzer-data.rb:12:B#initialize
- method_analyzer-data.rb:16:B#b
? Encoding: UTF -8
? ASCII BIT
=============================================================================================================================================================================================================================================
F
=============================================================================================================================================================================================================================================
Failure: test_plain_fullnames(MethodAnalyzerTextOutput)
/home/aycabta/rcodetools/test/test_method_analyzer.rb:56:in `test_plain_fullnames'
53:
54:
55: def test_plain_fullnames
=> 56: assert_equal @@fullnames_expected, @@fullnames_actual
57: end
58:
59: def test_plain_definitions
<"method fullnames\nmethod_analyzer-data.rb:8:Fixnum#+\nmethod_analyzer-data.rb:17:String#length\nmethod_analyzer-data.rb:20:Time.now Time#initialize\nmethod_analyzer-data.rb:21:Time#year Time#month Time#day Array#<<\nmethod_analyzer-data.rb:22:Class.new Object#initialize\nmethod_analyzer-data.rb:23:A#a\nmethod_analyzer-data.rb:24:Class.new B#initialize\nmethod_analyzer-data.rb:25:A#a\nmethod_analyzer-data.rb:26:B#b\nmethod_analyzer-data.rb:27:A#a B#b\nmethod_analyzer-data.rb:28:A#a B#b Fixnum#+\nmethod_analyzer-data.rb:29:A.foo\nmethod_analyzer-data.rb:30:A.foo\nmethod_analyzer-data.rb:31:B#bb=\nmethod_analyzer-data.rb:32:B#bb">(UTF-8) expected but was
<"method fullnames">(ASCII-8BIT)
diff:
method fullnames
- method_analyzer-data.rb:8:Fixnum#+
- method_analyzer-data.rb:17:String#length
- method_analyzer-data.rb:20:Time.now Time#initialize
- method_analyzer-data.rb:21:Time#year Time#month Time#day Array#<<
- method_analyzer-data.rb:22:Class.new Object#initialize
- method_analyzer-data.rb:23:A#a
- method_analyzer-data.rb:24:Class.new B#initialize
- method_analyzer-data.rb:25:A#a
- method_analyzer-data.rb:26:B#b
- method_analyzer-data.rb:27:A#a B#b
- method_analyzer-data.rb:28:A#a B#b Fixnum#+
- method_analyzer-data.rb:29:A.foo
- method_analyzer-data.rb:30:A.foo
- method_analyzer-data.rb:31:B#bb=
- method_analyzer-data.rb:32:B#bb
? Encoding: UTF -8
? ASCII BIT
=============================================================================================================================================================================================================================================
.F
=============================================================================================================================================================================================================================================
Failure: test_bindings(TestFunctional)
/home/aycabta/rcodetools/test/test_functional.rb:30:in `block (3 levels) in <class:TestFunctional>'
<"\nrequire 'test/unit'\n\nclass TestFoo < Test::Unit::TestCase\n def setup\n @o = []\n end\n\n def test_foo\n a = 1\n b = a\n assert_equal a, b\n assert_equal 1, b\n end\n\n def test_arr\n last = 1\n @o << last\n assert_equal last, @o.last\n assert_equal 1, @o.last\n end\n\n def test_bar\n a = b = c = 1\n d = a\n assert_equal a, d\n assert_equal b, d\n assert_equal c, d\n assert_equal 1, d\n end\nend\n"> expected but was
<"\nrequire 'test/unit'\n\nclass TestFoo < Test::Unit::TestCase\n def setup\n @o = []\n end\n\n def test_foo\n a = 1\n b = a\n assert_equal 1, b\n end\n\n def test_arr\n last = 1\n @o << last\n assert_equal 1, @o.last\n end\n\n def test_bar\n a = b = c = 1 # !> assigned but unused variable - c\n d = a\n assert_equal 1, d\n end\nend\n">
diff:
require 'test/unit'
class TestFoo < Test::Unit::TestCase
def setup
@o = []
end
def test_foo
a = 1
b = a
- assert_equal a, b
assert_equal 1, b
end
def test_arr
last = 1
@o << last
- assert_equal last, @o.last
assert_equal 1, @o.last
end
def test_bar
? a = b = c = 1 # !> assigned but unused variable - c
d = a
- assert_equal a, d
- assert_equal b, d
- assert_equal c, d
assert_equal 1, d
end
end
=============================================================================================================================================================================================================================================
F
=============================================================================================================================================================================================================================================
Failure: test_comment_out(TestFunctional)
/home/aycabta/rcodetools/test/test_functional.rb:30:in `block (3 levels) in <class:TestFunctional>'
<"\n# 1 # =>\n# 1 # => 2\n1 # => 1\n1\n# # =>\n# 1\n# # =>\n"> expected but was
<"\n# 1 # =>\n# 1 # => 2\n1 # => 1\n1 # !> possibly useless use of a literal in void context\n# # =>\n# 1\n# # =>\n">
diff:
# 1 # =>
# 1 # => 2
1 # => 1
? 1 # !> possibly useless use of a literal in void context
# # =>
# 1
# # =>
=============================================================================================================================================================================================================================================
.F
=============================================================================================================================================================================================================================================
Failure: test_completion_class_info(TestFunctional)
/home/aycabta/rcodetools/test/test_functional.rb:30:in `block (3 levels) in <class:TestFunctional>'
<"slice\tArray#slice\nslice!\tArray#slice!\n"> expected but was
<"slice\tArray#slice\nslice!\tArray#slice!\nslice_after\tEnumerable#slice_after\nslice_before\tEnumerable#slice_before\nslice_when\tEnumerable#slice_when\n">
diff:
slice Array#slice
slice! Array#slice!
+ slice_after Enumerable#slice_after
+ slice_before Enumerable#slice_before
+ slice_when Enumerable#slice_when
=============================================================================================================================================================================================================================================
.F
=============================================================================================================================================================================================================================================
Failure: test_completion_detect_rbtest(TestFunctional)
/home/aycabta/rcodetools/test/test_functional.rb:30:in `block (3 levels) in <class:TestFunctional>'
<"upcase\nupcase!\n"> expected but was
<"\n">
=============================================================================================================================================================================================================================================
......F
=============================================================================================================================================================================================================================================
Failure: test_completion_rbtest(TestFunctional)
/home/aycabta/rcodetools/test/test_functional.rb:30:in `block (3 levels) in <class:TestFunctional>'
<"upcase\nupcase!\n"> expected but was
<"\n">
=============================================================================================================================================================================================================================================
../home/aycabta/rcodetools/lib/rcodetools/completion.rb:173:in `rescue in runtime_data_with_class': #<struct Rcodetools::XMPFilter::RuntimeData results={1=>[]}, exceptions={}, bindings={}> (Rcodetools::ProcessParticularLine::RuntimeDataError)
from /home/aycabta/rcodetools/lib/rcodetools/completion.rb:168:in `runtime_data_with_class'
from /home/aycabta/rcodetools/lib/rcodetools/completion.rb:178:in `runtime_data'
from /home/aycabta/rcodetools/lib/rcodetools/doc.rb:91:in `doc'
from /home/aycabta/rcodetools/lib/rcodetools/doc.rb:16:in `run'
from /home/aycabta/rcodetools/bin/rct-doc:52:in `<main>'
F
=============================================================================================================================================================================================================================================
Failure: test_doc_detect_rbtest2(TestFunctional)
/home/aycabta/rcodetools/test/test_functional.rb:30:in `block (3 levels) in <class:TestFunctional>'
<"String#upcase\n"> expected but was
<"">
=============================================================================================================================================================================================================================================
/home/aycabta/rcodetools/lib/rcodetools/completion.rb:173:in `rescue in runtime_data_with_class': #<struct Rcodetools::XMPFilter::RuntimeData results={1=>[]}, exceptions={}, bindings={}> (Rcodetools::ProcessParticularLine::RuntimeDataError)
from /home/aycabta/rcodetools/lib/rcodetools/completion.rb:168:in `runtime_data_with_class'
from /home/aycabta/rcodetools/lib/rcodetools/completion.rb:178:in `runtime_data'
from /home/aycabta/rcodetools/lib/rcodetools/doc.rb:91:in `doc'
from /home/aycabta/rcodetools/lib/rcodetools/doc.rb:16:in `run'
from /home/aycabta/rcodetools/bin/rct-doc:52:in `<main>'
F
=============================================================================================================================================================================================================================================
Failure: test_doc_rbtest(TestFunctional)
/home/aycabta/rcodetools/test/test_functional.rb:30:in `block (3 levels) in <class:TestFunctional>'
<"String#upcase\n"> expected but was
<"">
=============================================================================================================================================================================================================================================
F
=============================================================================================================================================================================================================================================
Failure: test_exception(TestFunctional)
/home/aycabta/rcodetools/test/test_functional.rb:30:in `block (3 levels) in <class:TestFunctional>'
<"def foo\n raise NameError, \"ERR!!\" rescue $@ # => [\"-:2:in `foo'\", \"-:4\"]\nend\nfoo\n"> expected but was
<"def foo\n raise NameError, \"ERR!!\" rescue $@ # => [\"-:2:in `foo'\", \"-:4:in `<main>'\"]\nend\nfoo\n">
diff:
def foo
? raise NameError, "ERR!!" rescue $@ # => ["-:2:in `foo'", "-:4:in `<main>'"]
end
foo
=============================================================================================================================================================================================================================================
F
=============================================================================================================================================================================================================================================
Failure: test_expectations(TestFunctional)
/home/aycabta/rcodetools/test/test_functional.rb:30:in `block (3 levels) in <class:TestFunctional>'
<"\nrequire 'rubygems'\nrequire 'expectations'\n\nS = Struct.new :a\nExpectations do\n expect 2 do\n 1 + 1\n end\n\n expect 1 do\n \"a\".length\n end\n\n expect nil do\n [][1]\n end\n\n expect NoMethodError do\n 1.hoge\n end\n\n expect 2.0999..2.1001 do\n 1.1 + 1.0\n end\n\n expect S do\n S.new(1)\n end\n\n expect \"#<struct S a=1>\" do\n S.new(1).inspect\n end\n\nend\n"> expected but was
<"\nrequire 'rubygems'\nrequire 'expectations'\n\nS = Struct.new :a\nExpectations do\n expect do\n 1 + 1\n end\n\n expect do\n \"a\".length\n end\n\n expect do\n [][1]\n end\n\n expect do\n 1.hoge\n end\n\n expect do\n 1.1 + 1.0\n end\n\n expect do\n S.new(1)\n end\n\nend\n# ~> /home/aycabta/.rbenv/versions/2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- expectations (LoadError)\n# ~> \tfrom /home/aycabta/.rbenv/versions/2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'\n# ~> \tfrom -:3:in `<main>'\n">
diff:
require 'rubygems'
require 'expectations'
S = Struct.new :a
Expectations do
? expect 2 do
1 + 1
end
? expect 1 do
"a".length
end
? expect nil do
[][1]
end
? expect NoMethodError do
1.hoge
end
? expect 2.0999..2.1001 do
1.1 + 1.0
end
? expect S do
S.new(1)
end
- expect "#<struct S a=1>" do
- S.new(1).inspect
- end
-
end
+ # ~> /home/aycabta/.rbenv/versions/2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- expectations (LoadError)
+ # ~> from /home/aycabta/.rbenv/versions/2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
+ # ~> from -:3:in `<main>'
=============================================================================================================================================================================================================================================
F
=============================================================================================================================================================================================================================================
Failure: test_last_match(TestFunctional)
/home/aycabta/rcodetools/test/test_functional.rb:30:in `block (3 levels) in <class:TestFunctional>'
<"\nmd = \"abc\".match(/(.)(.)./)\n1\n# => 1\n[$1, $2] # => [\"a\", \"b\"]\n$1 # => \"a\"\n"> expected but was
<"\nmd = \"abc\".match(/(.)(.)./) # !> assigned but unused variable - md\n1\n# => 1\n[$1, $2] # => [\"a\", \"b\"]\n$1 # => \"a\"\n">
diff:
? md = "abc".match(/(.)(.)./) # !> assigned but unused variable - md
1
# => 1
[$1, $2] # => ["a", "b"]
$1 # => "a"
=============================================================================================================================================================================================================================================
......F
=============================================================================================================================================================================================================================================
Failure: test_multi_line_annotation_7(TestFunctional)
/home/aycabta/rcodetools/test/test_functional.rb:30:in `block (3 levels) in <class:TestFunctional>'
<"\n[1,2]\n# => [1, 2]\nraise\n[3,4]\n# => \n[5,6]\n# => \n# ~> -:2: unhandled exception\n"> expected but was
<"\n[1,2]\n# => [1, 2]\nraise\n[3,4]\n# => \n[5,6]\n# => \n# ~> -:2:in `<main>': unhandled exception\n">
diff:
[1,2]
# => [1, 2]
raise
[3,4]
# =>
[5,6]
# =>
? # ~> -:2:in `<main>': unhandled exception
=============================================================================================================================================================================================================================================
......F
=============================================================================================================================================================================================================================================
Failure: test_rspec(TestFunctional)
/home/aycabta/rcodetools/test/test_functional.rb:30:in `block (3 levels) in <class:TestFunctional>'
<"\nclass X\n Y = Struct.new(:a)\n def foo(b); b ? Y.new(2) : 2 end\n def bar; raise \"No good\" end\n def baz; nil end\n def fubar(x); x ** 2.0 + 1 end\n def babar; [1,2] end\n A = 1\n A = 1 # !> already initialized constant A\nend\n\n\ndescribe \"xmpfilter's expectation expansion\" do\n before do\n @o = X.new\n end\n\n it \"should expand should == expectations\" do\n (@o.foo(true)).should be_a_kind_of(X::Y)\n (@o.foo(true).inspect).should == (\"#<struct X::Y a=2>\")\n (@o.foo(true).a).should == (2)\n (@o.foo(false)).should == (2)\n end\n \n it \"should expand should raise_error expectations\" do\n lambda{@o.bar}.should raise_error(RuntimeError)\n end\n\n it \"should expand should be_nil expectations\" do\n (@o.baz).should be_nil\n end\n\n it \"should expand correct expectations for complex values\" do\n (@o.babar).should == ([1, 2])\n end\n\n it \"should expand should be_close expectations\" do\n (@o.fubar(10)).should be_close(101.0, 0.0001)\n end\nend\n\ndescribe \"xmpfilter's automagic binding detection\" do\n it \"should expand should == expectations\" do\n a = b = c = 1\n d = a\n (d).should == (a)\n (d).should == (b)\n (d).should == (c)\n (d).should == (1)\n end\nend\n"> expected but was
<"\nclass X\n Y = Struct.new(:a)\n def foo(b); b ? Y.new(2) : 2 end\n def bar; raise \"No good\" end\n def baz; nil end\n def fubar(x); x ** 2.0 + 1 end\n def babar; [1,2] end\n A = 1\n A = 1\nend\n\n\ndescribe \"xmpfilter's expectation expansion\" do\n before do\n @o = X.new\n end\n\n it \"should expand should == expectations\" do\n lambda{@o.foo(true)}.should raise_error()\n lambda{@o.foo(true).a}.should raise_error()\n lambda{@o.foo(false)}.should raise_error()\n end\n \n it \"should expand should raise_error expectations\" do\n lambda{@o.bar}.should raise_error()\n end\n\n it \"should expand should be_nil expectations\" do\n lambda{@o.baz}.should raise_error()\n end\n\n it \"should expand correct expectations for complex values\" do\n lambda{@o.babar}.should raise_error()\n end\n\n it \"should expand should be_close expectations\" do\n lambda{@o.fubar(10)}.should raise_error()\n end\nend\n\ndescribe \"xmpfilter's automagic binding detection\" do\n it \"should expand should == expectations\" do\n a = b = c = 1\n d = a\n lambda{d}.should raise_error()\n end\nend\n">
=============================================================================================================================================================================================================================================
F
=============================================================================================================================================================================================================================================
Failure: test_rspec_poetry(TestFunctional)
/home/aycabta/rcodetools/test/test_functional.rb:30:in `block (3 levels) in <class:TestFunctional>'
<"\nclass X\n Y = Struct.new(:a)\n def foo(b); b ? Y.new(2) : 2 end\n def bar; raise \"No good\" end\n def baz; nil end\n def fubar(x); x ** 2.0 + 1 end\n def babar; [1,2] end\n A = 1\n A = 1 # !> already initialized constant A\nend\n\n\ndescribe \"xmpfilter's expectation expansion\" do\n before do\n @o = X.new\n end\n\n it \"should expand should == expectations\" do\n @o.foo(true).should be_a_kind_of(X::Y)\n @o.foo(true).inspect.should == \"#<struct X::Y a=2>\"\n @o.foo(true).a.should == 2\n @o.foo(false).should == 2\n end\n \n it \"should expand should raise_error expectations\" do\n lambda{@o.bar}.should raise_error(RuntimeError)\n end\n\n it \"should expand should be_nil expectations\" do\n @o.baz.should be_nil\n end\n\n it \"should expand correct expectations for complex values\" do\n @o.babar.should == [1, 2]\n end\n\n it \"should expand should be_close expectations\" do\n @o.fubar(10).should be_close(101.0, 0.0001)\n end\nend\n\ndescribe \"xmpfilter's automagic binding detection\" do\n it \"should expand should == expectations\" do\n a = b = c = 1\n d = a\n d.should == a\n d.should == b\n d.should == c\n d.should == 1\n end\nend\n"> expected but was
<"\nclass X\n Y = Struct.new(:a)\n def foo(b); b ? Y.new(2) : 2 end\n def bar; raise \"No good\" end\n def baz; nil end\n def fubar(x); x ** 2.0 + 1 end\n def babar; [1,2] end\n A = 1\n A = 1\nend\n\n\ndescribe \"xmpfilter's expectation expansion\" do\n before do\n @o = X.new\n end\n\n it \"should expand should == expectations\" do\n lambda{@o.foo(true)}.should raise_error()\n lambda{@o.foo(true).a}.should raise_error()\n lambda{@o.foo(false)}.should raise_error()\n end\n \n it \"should expand should raise_error expectations\" do\n lambda{@o.bar}.should raise_error()\n end\n\n it \"should expand should be_nil expectations\" do\n lambda{@o.baz}.should raise_error()\n end\n\n it \"should expand correct expectations for complex values\" do\n lambda{@o.babar}.should raise_error()\n end\n\n it \"should expand should be_close expectations\" do\n lambda{@o.fubar(10)}.should raise_error()\n end\nend\n\ndescribe \"xmpfilter's automagic binding detection\" do\n it \"should expand should == expectations\" do\n a = b = c = 1\n d = a\n lambda{d}.should raise_error()\n end\nend\n">
=============================================================================================================================================================================================================================================
F
=============================================================================================================================================================================================================================================
Failure: test_simple_annotation(TestFunctional)
/home/aycabta/rcodetools/test/test_functional.rb:30:in `block (3 levels) in <class:TestFunctional>'
<"\na = 1\n10.times do |i|\n i ** 2 # => 0, 1, 4, 9, 16, 25, 36, 49, 64, 81\n a += i\nend\nA = 1\nA = 1 # !> already initialized constant A\n"> expected but was
<"\na = 1\n10.times do |i|\n i ** 2 # => 0, 1, 4, 9, 16, 25, 36, 49, 64, 81\n a += i\nend\nA = 1 # !> previous definition of A was here\nA = 1 # !> already initialized constant A\n">
diff:
a = 1
10.times do |i|
i ** 2 # => 0, 1, 4, 9, 16, 25, 36, 49, 64, 81
a += i
end
? A = 1 # !> previous definition of A was here
A = 1 # !> already initialized constant A
=============================================================================================================================================================================================================================================
F
=============================================================================================================================================================================================================================================
Failure: test_unit_test(TestFunctional)
/home/aycabta/rcodetools/test/test_functional.rb:30:in `block (3 levels) in <class:TestFunctional>'
<"\nclass X\n Y = Struct.new(:a)\n def foo(b); b ? Y.new(2) : 2 end\n def bar; raise \"No good\" end\n def baz; nil end\n def fubar(x); x ** 2.0 + 1 end\n def babar; [1,2] end\n A = 1\n A = 1 # !> already initialized constant A\n def difftype() [1, \"s\"] end\nend\n\n\nrequire 'test/unit'\nclass Test_X < Test::Unit::TestCase\n def setup\n @o = X.new\n end\n\n def test_foo\n assert_kind_of(X::Y, @o.foo(true))\n assert_equal(\"#<struct X::Y a=2>\", @o.foo(true).inspect)\n assert_equal(2, @o.foo(true).a)\n assert_equal(2, @o.foo(false))\n end\n \n def test_bar\n assert_raise(RuntimeError){@o.bar}\n end\n\n def test_baz\n assert_nil(@o.baz)\n end\n\n def test_babar\n assert_equal([1, 2], @o.babar)\n end\n\n def test_fubar\n assert_in_delta(101.0, @o.fubar(10), 0.0001)\n end\n\n def test_difftype\n for x in @o.difftype\n #xmpfilter: WARNING!! extra values ignored\n assert_equal(1, x)\n end\n end\n\nend\n\n"> expected but was
<"\nclass X\n Y = Struct.new(:a)\n def foo(b); b ? Y.new(2) : 2 end\n def bar; raise \"No good\" end\n def baz; nil end\n def fubar(x); x ** 2.0 + 1 end\n def babar; [1,2] end\n A = 1 # !> previous definition of A was here\n A = 1 # !> already initialized constant X::A\n def difftype() [1, \"s\"] end\nend\n\n\nrequire 'test/unit'\nclass Test_X < Test::Unit::TestCase\n def setup\n @o = X.new\n end\n\n def test_foo\n assert_kind_of(X::Y, @o.foo(true))\n assert_equal(\"#<struct X::Y a=2>\", @o.foo(true).inspect)\n assert_equal(2, @o.foo(true).a)\n assert_equal(2, @o.foo(false))\n end\n \n def test_bar\n assert_raise(RuntimeError){@o.bar}\n end\n\n def test_baz\n assert_nil(@o.baz)\n end\n\n def test_babar\n assert_equal([1, 2], @o.babar)\n end\n\n def test_fubar\n assert_in_delta(101.0, @o.fubar(10), 0.0001)\n end\n\n def test_difftype\n for x in @o.difftype\n #xmpfilter: WARNING!! extra values ignored\n assert_equal(1, x)\n end\n end\n\nend\n\n">
diff:
class X
Y = Struct.new(:a)
def foo(b); b ? Y.new(2) : 2 end
def bar; raise "No good" end
def baz; nil end
def fubar(x); x ** 2.0 + 1 end
def babar; [1,2] end
? A = 1 # !> previous definition of A was here
? A = 1 # !> already initialized constant X::A
def difftype() [1, "s"] end
end
require 'test/unit'
class Test_X < Test::Unit::TestCase
def setup
@o = X.new
end
def test_foo
assert_kind_of(X::Y, @o.foo(true))
assert_equal("#<struct X::Y a=2>", @o.foo(true).inspect)
assert_equal(2, @o.foo(true).a)
assert_equal(2, @o.foo(false))
end
def test_bar
assert_raise(RuntimeError){@o.bar}
end
def test_baz
assert_nil(@o.baz)
end
def test_babar
assert_equal([1, 2], @o.babar)
end
def test_fubar
assert_in_delta(101.0, @o.fubar(10), 0.0001)
end
def test_difftype
for x in @o.difftype
#xmpfilter: WARNING!! extra values ignored
assert_equal(1, x)
end
end
end
=============================================================================================================================================================================================================================================
F
=============================================================================================================================================================================================================================================
Failure: test_unit_test_detect_rbtest(TestFunctional)
/home/aycabta/rcodetools/test/test_functional.rb:30:in `block (3 levels) in <class:TestFunctional>'
<"\nclass X\n Y = Struct.new(:a)\n def foo(b); b ? Y.new(2) : 2 end\n def bar; raise \"No good\" end\n def baz; nil end\n def fubar(x); x ** 2.0 + 1 end\n def babar; [1,2] end\n A = 1\n A = 1 # !> already initialized constant A\n def difftype() [1, \"s\"] end\nend\n\n\nrequire 'test/unit'\nclass Test_X < Test::Unit::TestCase\n def setup\n @o = X.new\n end\n\n def test_foo\n assert_kind_of(X::Y, @o.foo(true))\n assert_equal(\"#<struct X::Y a=2>\", @o.foo(true).inspect)\n assert_equal(2, @o.foo(true).a)\n assert_equal(2, @o.foo(false))\n end\n \n def test_bar\n assert_raise(RuntimeError){@o.bar}\n end\n\n def test_baz\n assert_nil(@o.baz)\n end\n\n def test_babar\n assert_equal([1, 2], @o.babar)\n end\n\n def test_fubar\n assert_in_delta(101.0, @o.fubar(10), 0.0001)\n end\n\n def test_difftype\n for x in @o.difftype\n #xmpfilter: WARNING!! extra values ignored\n assert_equal(1, x)\n end\n end\n\nend\n\n"> expected but was
<"\nclass X\n Y = Struct.new(:a)\n def foo(b); b ? Y.new(2) : 2 end\n def bar; raise \"No good\" end\n def baz; nil end\n def fubar(x); x ** 2.0 + 1 end\n def babar; [1,2] end\n A = 1 # !> previous definition of A was here\n A = 1 # !> already initialized constant X::A\n def difftype() [1, \"s\"] end\nend\n\n\nrequire 'test/unit'\nclass Test_X < Test::Unit::TestCase\n def setup\n @o = X.new\n end\n\n def test_foo\n assert_kind_of(X::Y, @o.foo(true))\n assert_equal(\"#<struct X::Y a=2>\", @o.foo(true).inspect)\n assert_equal(2, @o.foo(true).a)\n assert_equal(2, @o.foo(false))\n end\n \n def test_bar\n assert_raise(RuntimeError){@o.bar}\n end\n\n def test_baz\n assert_nil(@o.baz)\n end\n\n def test_babar\n assert_equal([1, 2], @o.babar)\n end\n\n def test_fubar\n assert_in_delta(101.0, @o.fubar(10), 0.0001)\n end\n\n def test_difftype\n for x in @o.difftype\n #xmpfilter: WARNING!! extra values ignored\n assert_equal(1, x)\n end\n end\n\nend\n\n">
diff:
class X
Y = Struct.new(:a)
def foo(b); b ? Y.new(2) : 2 end
def bar; raise "No good" end
def baz; nil end
def fubar(x); x ** 2.0 + 1 end
def babar; [1,2] end
? A = 1 # !> previous definition of A was here
? A = 1 # !> already initialized constant X::A
def difftype() [1, "s"] end
end
require 'test/unit'
class Test_X < Test::Unit::TestCase
def setup
@o = X.new
end
def test_foo
assert_kind_of(X::Y, @o.foo(true))
assert_equal("#<struct X::Y a=2>", @o.foo(true).inspect)
assert_equal(2, @o.foo(true).a)
assert_equal(2, @o.foo(false))
end
def test_bar
assert_raise(RuntimeError){@o.bar}
end
def test_baz
assert_nil(@o.baz)
end
def test_babar
assert_equal([1, 2], @o.babar)
end
def test_fubar
assert_in_delta(101.0, @o.fubar(10), 0.0001)
end
def test_difftype
for x in @o.difftype
#xmpfilter: WARNING!! extra values ignored
assert_equal(1, x)
end
end
end
=============================================================================================================================================================================================================================================
F
=============================================================================================================================================================================================================================================
Failure: test_unit_test_detect_rbtest2(TestFunctional)
/home/aycabta/rcodetools/test/test_functional.rb:30:in `block (3 levels) in <class:TestFunctional>'
<"=begin test_bar\nassert_equal(\"BAR\", bar(\"bar\"))\n=end\ndef bar(s)\n s.upcase\nend\n"> expected but was
<"=begin test_bar\nassert_raise(){bar(\"bar\")}\n=end\ndef bar(s)\n s.upcase\nend\n">
diff:
=begin test_bar
? assert_ equal("BAR", bar("bar"))
? rais ){ }
=end
def bar(s)
s.upcase
end
=============================================================================================================================================================================================================================================
F
=============================================================================================================================================================================================================================================
Failure: test_unit_test_poetry(TestFunctional)
/home/aycabta/rcodetools/test/test_functional.rb:30:in `block (3 levels) in <class:TestFunctional>'
<"\nclass X\n Y = Struct.new(:a)\n def foo(b); b ? Y.new(2) : 2 end\n def bar; raise \"No good\" end\n def baz; nil end\n def fubar(x); x ** 2.0 + 1 end\n def babar; [1,2] end\n A = 1\n A = 1 # !> already initialized constant A\n def difftype() [1, \"s\"] end\nend\n\n\nrequire 'test/unit'\nclass Test_X < Test::Unit::TestCase\n def setup\n @o = X.new\n end\n\n def test_foo\n assert_kind_of X::Y, @o.foo(true) \n assert_equal \"#<struct X::Y a=2>\", @o.foo(true).inspect\n assert_equal 2, @o.foo(true).a\n assert_equal 2, @o.foo(false)\n end\n \n def test_bar\n assert_raise(RuntimeError){@o.bar}\n end\n\n def test_baz\n assert_nil @o.baz\n end\n\n def test_babar\n assert_equal [1, 2], @o.babar\n end\n\n def test_fubar\n assert_in_delta 101.0, @o.fubar(10), 0.0001\n end\n\n def test_difftype\n for x in @o.difftype\n #xmpfilter: WARNING!! extra values ignored\n assert_equal 1, x\n end\n end\n\nend\n\n"> expected but was
<"\nclass X\n Y = Struct.new(:a)\n def foo(b); b ? Y.new(2) : 2 end\n def bar; raise \"No good\" end\n def baz; nil end\n def fubar(x); x ** 2.0 + 1 end\n def babar; [1,2] end\n A = 1 # !> previous definition of A was here\n A = 1 # !> already initialized constant X::A\n def difftype() [1, \"s\"] end\nend\n\n\nrequire 'test/unit'\nclass Test_X < Test::Unit::TestCase\n def setup\n @o = X.new\n end\n\n def test_foo\n assert_kind_of X::Y, @o.foo(true) \n assert_equal \"#<struct X::Y a=2>\", @o.foo(true).inspect\n assert_equal 2, @o.foo(true).a\n assert_equal 2, @o.foo(false)\n end\n \n def test_bar\n assert_raise(RuntimeError){@o.bar}\n end\n\n def test_baz\n assert_nil @o.baz\n end\n\n def test_babar\n assert_equal [1, 2], @o.babar\n end\n\n def test_fubar\n assert_in_delta 101.0, @o.fubar(10), 0.0001\n end\n\n def test_difftype\n for x in @o.difftype\n #xmpfilter: WARNING!! extra values ignored\n assert_equal 1, x\n end\n end\n\nend\n\n">
diff:
class X
Y = Struct.new(:a)
def foo(b); b ? Y.new(2) : 2 end
def bar; raise "No good" end
def baz; nil end
def fubar(x); x ** 2.0 + 1 end
def babar; [1,2] end
? A = 1 # !> previous definition of A was here
? A = 1 # !> already initialized constant X::A
def difftype() [1, "s"] end
end
require 'test/unit'
class Test_X < Test::Unit::TestCase
def setup
@o = X.new
end
def test_foo
assert_kind_of X::Y, @o.foo(true)
assert_equal "#<struct X::Y a=2>", @o.foo(true).inspect
assert_equal 2, @o.foo(true).a
assert_equal 2, @o.foo(false)
end
def test_bar
assert_raise(RuntimeError){@o.bar}
end
def test_baz
assert_nil @o.baz
end
def test_babar
assert_equal [1, 2], @o.babar
end
def test_fubar
assert_in_delta 101.0, @o.fubar(10), 0.0001
end
def test_difftype
for x in @o.difftype
#xmpfilter: WARNING!! extra values ignored
assert_equal 1, x
end
end
end
=============================================================================================================================================================================================================================================
F
=============================================================================================================================================================================================================================================
Failure: test_unit_test_rbtest(TestFunctional)
/home/aycabta/rcodetools/test/test_functional.rb:30:in `block (3 levels) in <class:TestFunctional>'
<"=begin test_bar\nassert_equal(\"BAR\", bar(\"bar\"))\n=end\ndef bar(s)\n s.upcase\nend\n"> expected but was
<"=begin test_bar\nassert_raise(){bar(\"bar\")}\n=end\ndef bar(s)\n s.upcase\nend\n">
diff:
=begin test_bar
? assert_ equal("BAR", bar("bar"))
? rais ){ }
=end
def bar(s)
s.upcase
end
=============================================================================================================================================================================================================================================
.E
=============================================================================================================================================================================================================================================
Error: test_<Struct: a,b> < Struct(TestMethodArgs): NoMethodError: undefined method `slice!' for nil:NilClass
/home/aycabta/rcodetools/test/test_method_args.rb:69:in `strip_dir!'
/home/aycabta/rcodetools/test/test_method_args.rb:86:in `block (2 levels) in <class:TestMethodArgs>'
=============================================================================================================================================================================================================================================
E
=============================================================================================================================================================================================================================================
Error: test_<Struct: c> < Struct(TestMethodArgs): NoMethodError: undefined method `slice!' for nil:NilClass
/home/aycabta/rcodetools/test/test_method_args.rb:69:in `strip_dir!'
/home/aycabta/rcodetools/test/test_method_args.rb:86:in `block (2 levels) in <class:TestMethodArgs>'
=============================================================================================================================================================================================================================================
E
=============================================================================================================================================================================================================================================
Error: test_AClass <- VariableArgsMethods(TestMethodArgs): NoMethodError: undefined method `slice!' for nil:NilClass
/home/aycabta/rcodetools/test/test_method_args.rb:69:in `strip_dir!'
/home/aycabta/rcodetools/test/test_method_args.rb:86:in `block (2 levels) in <class:TestMethodArgs>'
=============================================================================================================================================================================================================================================
E
=============================================================================================================================================================================================================================================
Error: test_AClass <= VariableArgsMethods(TestMethodArgs): NoMethodError: undefined method `slice!' for nil:NilClass
/home/aycabta/rcodetools/test/test_method_args.rb:69:in `strip_dir!'
/home/aycabta/rcodetools/test/test_method_args.rb:86:in `block (2 levels) in <class:TestMethodArgs>'
=============================================================================================================================================================================================================================================
E
=============================================================================================================================================================================================================================================
Error: test_ASubClass < AClass(TestMethodArgs): NoMethodError: undefined method `slice!' for nil:NilClass
/home/aycabta/rcodetools/test/test_method_args.rb:69:in `strip_dir!'
/home/aycabta/rcodetools/test/test_method_args.rb:86:in `block (2 levels) in <class:TestMethodArgs>'
=============================================================================================================================================================================================================================================
E
=============================================================================================================================================================================================================================================
Error: test_AnAbstractClass#method_in_AnAbstractClass(TestMethodArgs): NoMethodError: undefined method `slice!' for nil:NilClass
/home/aycabta/rcodetools/test/test_method_args.rb:69:in `strip_dir!'
/home/aycabta/rcodetools/test/test_method_args.rb:86:in `block (2 levels) in <class:TestMethodArgs>'
=============================================================================================================================================================================================================================================
E
=============================================================================================================================================================================================================================================
Error: test_Base#method_in_Digest_Base(TestMethodArgs): NoMethodError: undefined method `slice!' for nil:NilClass
/home/aycabta/rcodetools/test/test_method_args.rb:69:in `strip_dir!'
/home/aycabta/rcodetools/test/test_method_args.rb:86:in `block (2 levels) in <class:TestMethodArgs>'
=============================================================================================================================================================================================================================================
E
=============================================================================================================================================================================================================================================
Error: test_Bignum#method_in_Bignum(TestMethodArgs): NoMethodError: undefined method `slice!' for nil:NilClass
/home/aycabta/rcodetools/test/test_method_args.rb:69:in `strip_dir!'
/home/aycabta/rcodetools/test/test_method_args.rb:86:in `block (2 levels) in <class:TestMethodArgs>'
=============================================================================================================================================================================================================================================
E
=============================================================================================================================================================================================================================================
Error: test_Binding#method_in_Binding(TestMethodArgs): NoMethodError: undefined method `slice!' for nil:NilClass
/home/aycabta/rcodetools/test/test_method_args.rb:69:in `strip_dir!'
/home/aycabta/rcodetools/test/test_method_args.rb:86:in `block (2 levels) in <class:TestMethodArgs>'
=============================================================================================================================================================================================================================================
E
=============================================================================================================================================================================================================================================
Error: test_Continuation#method_in_Continuation(TestMethodArgs): NoMethodError: undefined method `slice!' for nil:NilClass
/home/aycabta/rcodetools/test/test_method_args.rb:69:in `strip_dir!'
/home/aycabta/rcodetools/test/test_method_args.rb:86:in `block (2 levels) in <class:TestMethodArgs>'
=============================================================================================================================================================================================================================================
E
=============================================================================================================================================================================================================================================
Error: test_FixedArgsMethods#b(TestMethodArgs): NoMethodError: undefined method `slice!' for nil:NilClass
/home/aycabta/rcodetools/test/test_method_args.rb:69:in `strip_dir!'
/home/aycabta/rcodetools/test/test_method_args.rb:86:in `block (2 levels) in <class:TestMethodArgs>'
=============================================================================================================================================================================================================================================
E
=============================================================================================================================================================================================================================================
Error: test_FixedArgsMethods#by_attr_accessor(TestMethodArgs): NoMethodError: undefined method `slice!' for nil:NilClass
/home/aycabta/rcodetools/test/test_method_args.rb:69:in `strip_dir!'
/home/aycabta/rcodetools/test/test_method_args.rb:86:in `block (2 levels) in <class:TestMethodArgs>'
=============================================================================================================================================================================================================================================
E
=============================================================================================================================================================================================================================================
Error: test_FixedArgsMethods#by_attr_accessor=(TestMethodArgs): NoMethodError: undefined method `slice!' for nil:NilClass
/home/aycabta/rcodetools/test/test_method_args.rb:69:in `strip_dir!'
/home/aycabta/rcodetools/test/test_method_args.rb:86:in `block (2 levels) in <class:TestMethodArgs>'
=============================================================================================================================================================================================================================================
E
=============================================================================================================================================================================================================================================
Error: test_FixedArgsMethods#by_attr_false(TestMethodArgs): NoMethodError: undefined method `slice!' for nil:NilClass
/home/aycabta/rcodetools/test/test_method_args.rb:69:in `strip_dir!'
/home/aycabta/rcodetools/test/test_method_args.rb:86:in `block (2 levels) in <class:TestMethodArgs>'
=============================================================================================================================================================================================================================================
E
=============================================================================================================================================================================================================================================
Error: test_FixedArgsMethods#by_attr_reader_1(TestMethodArgs): NoMethodError: undefined method `slice!' for nil:NilClass
/home/aycabta/rcodetools/test/test_method_args.rb:69:in `strip_dir!'
/home/aycabta/rcodetools/test/test_method_args.rb:86:in `block (2 levels) in <class:TestMethodArgs>'
=============================================================================================================================================================================================================================================
E
=============================================================================================================================================================================================================================================
Error: test_FixedArgsMethods#by_attr_reader_2(TestMethodArgs): NoMethodError: undefined method `slice!' for nil:NilClass
/home/aycabta/rcodetools/test/test_method_args.rb:69:in `strip_dir!'
/home/aycabta/rcodetools/test/test_method_args.rb:86:in `block (2 levels) in <class:TestMethodArgs>'
=============================================================================================================================================================================================================================================
E
=============================================================================================================================================================================================================================================
Error: test_FixedArgsMethods#by_attr_true(TestMethodArgs): NoMethodError: undefined method `slice!' for nil:NilClass
/home/aycabta/rcodetools/test/test_method_args.rb:69:in `strip_dir!'
/home/aycabta/rcodetools/test/test_method_args.rb:86:in `block (2 levels) in <class:TestMethodArgs>'
=============================================================================================================================================================================================================================================
E
=============================================================================================================================================================================================================================================
Error: test_FixedArgsMethods#by_attr_true=(TestMethodArgs): NoMethodError: undefined method `slice!' for nil:NilClass
/home/aycabta/rcodetools/test/test_method_args.rb:69:in `strip_dir!'
/home/aycabta/rcodetools/test/test_method_args.rb:86:in `block (2 levels) in <class:TestMethodArgs>'
=============================================================================================================================================================================================================================================
E
=============================================================================================================================================================================================================================================
Error: test_FixedArgsMethods#by_attr_writer=(TestMethodArgs): NoMethodError: undefined method `slice!' for nil:NilClass
/home/aycabta/rcodetools/test/test_method_args.rb:69:in `strip_dir!'
/home/aycabta/rcodetools/test/test_method_args.rb:86:in `block (2 levels) in <class:TestMethodArgs>'
=============================================================================================================================================================================================================================================
E
=============================================================================================================================================================================================================================================
Error: test_FixedArgsMethods#defmethod(TestMethodArgs): NoMethodError: undefined method `slice!' for nil:NilClass
/home/aycabta/rcodetools/test/test_method_args.rb:69:in `strip_dir!'
/home/aycabta/rcodetools/test/test_method_args.rb:86:in `block (2 levels) in <class:TestMethodArgs>'
=============================================================================================================================================================================================================================================
E
=============================================================================================================================================================================================================================================
Error: test_FixedArgsMethods#f(TestMethodArgs): NoMethodError: undefined method `slice!' for nil:NilClass
/home/aycabta/rcodetools/test/test_method_args.rb:69:in `strip_dir!'
/home/aycabta/rcodetools/test/test_method_args.rb:86:in `block (2 levels) in <class:TestMethodArgs>'
=============================================================================================================================================================================================================================================
E
=============================================================================================================================================================================================================================================
Error: test_FixedArgsMethods#initialize(TestMethodArgs): NoMethodError: undefined method `slice!' for nil:NilClass
/home/aycabta/rcodetools/test/test_method_args.rb:69:in `strip_dir!'
/home/aycabta/rcodetools/test/test_method_args.rb:86:in `block (2 levels) in <class:TestMethodArgs>'
=============================================================================================================================================================================================================================================
E
=============================================================================================================================================================================================================================================
Error: test_FixedArgsMethods#private_meth(TestMethodArgs): NoMethodError: undefined method `slice!' for nil:NilClass
/home/aycabta/rcodetools/test/test_method_args.rb:69:in `strip_dir!'
/home/aycabta/rcodetools/test/test_method_args.rb:86:in `block (2 levels) in <class:TestMethodArgs>'
=============================================================================================================================================================================================================================================
E
=============================================================================================================================================================================================================================================
Error: test_FixedArgsMethods.singleton(TestMethodArgs): NoMethodError: undefined method `slice!' for nil:NilClass
/home/aycabta/rcodetools/test/test_method_args.rb:69:in `strip_dir!'
/home/aycabta/rcodetools/test/test_method_args.rb:86:in `block (2 levels) in <class:TestMethodArgs>'
=============================================================================================================================================================================================================================================
E
=============================================================================================================================================================================================================================================
Error: test_FixedArgsMethods.singleton_attr_accessor(TestMethodArgs): NoMethodError: undefined method `slice!' for nil:NilClass
/home/aycabta/rcodetools/test/test_method_args.rb:69:in `strip_dir!'
/home/aycabta/rcodetools/test/test_method_args.rb:86:in `block (2 levels) in <class:TestMethodArgs>'
=============================================================================================================================================================================================================================================
E
=============================================================================================================================================================================================================================================
Error: test_FixedArgsMethods.singleton_attr_accessor=(TestMethodArgs): NoMethodError: undefined method `slice!' for nil:NilClass
/home/aycabta/rcodetools/test/test_method_args.rb:69:in `strip_dir!'
/home/aycabta/rcodetools/test/test_method_args.rb:86:in `block (2 levels) in <class:TestMethodArgs>'
=============================================================================================================================================================================================================================================
E
=============================================================================================================================================================================================================================================
Error: test_FixedArgsMethods.singleton_defmethod(TestMethodArgs): NoMethodError: undefined method `slice!' for nil:NilClass
/home/aycabta/rcodetools/test/test_method_args.rb:69:in `strip_dir!'
/home/aycabta/rcodetools/test/test_method_args.rb:86:in `block (2 levels) in <class:TestMethodArgs>'
=============================================================================================================================================================================================================================================
E
=============================================================================================================================================================================================================================================
Error: test_Fixnum#method_in_Fixnum(TestMethodArgs): NoMethodError: undefined method `slice!' for nil:NilClass
/home/aycabta/rcodetools/test/test_method_args.rb:69:in `strip_dir!'
/home/aycabta/rcodetools/test/test_method_args.rb:86:in `block (2 levels) in <class:TestMethodArgs>'
=============================================================================================================================================================================================================================================
E
=============================================================================================================================================================================================================================================
Error: test_Fixnum.singleton_method_in_Fixnum(TestMethodArgs): NoMethodError: undefined method `slice!' for nil:NilClass
/home/aycabta/rcodetools/test/test_method_args.rb:69:in `strip_dir!'
/home/aycabta/rcodetools/test/test_method_args.rb:86:in `block (2 levels) in <class:TestMethodArgs>'
=============================================================================================================================================================================================================================================
E
=============================================================================================================================================================================================================================================
Error: test_Float#method_in_Float(TestMethodArgs): NoMethodError: undefined method `slice!' for nil:NilClass
/home/aycabta/rcodetools/test/test_method_args.rb:69:in `strip_dir!'
/home/aycabta/rcodetools/test/test_method_args.rb:86:in `block (2 levels) in <class:TestMethodArgs>'
=============================================================================================================================================================================================================================================
E
=============================================================================================================================================================================================================================================
Error: test_Method#method_in_Method(TestMethodArgs): NoMethodError: undefined method `slice!' for nil:NilClass
/home/aycabta/rcodetools/test/test_method_args.rb:69:in `strip_dir!'
/home/aycabta/rcodetools/test/test_method_args.rb:86:in `block (2 levels) in <class:TestMethodArgs>'
=============================================================================================================================================================================================================================================
E
=============================================================================================================================================================================================================================================
Error: test_NilClass#method_in_NilClass(TestMethodArgs): NoMethodError: undefined method `slice!' for nil:NilClass
/home/aycabta/rcodetools/test/test_method_args.rb:69:in `strip_dir!'
/home/aycabta/rcodetools/test/test_method_args.rb:86:in `block (2 levels) in <class:TestMethodArgs>'
=============================================================================================================================================================================================================================================
E
=============================================================================================================================================================================================================================================
Error: test_Proc#method_in_Proc(TestMethodArgs): NoMethodError: undefined method `slice!' for nil:NilClass
/home/aycabta/rcodetools/test/test_method_args.rb:69:in `strip_dir!'
/home/aycabta/rcodetools/test/test_method_args.rb:86:in `block (2 levels) in <class:TestMethodArgs>'
=============================================================================================================================================================================================================================================
E
=============================================================================================================================================================================================================================================
Error: test_Struct#method_in_Struct(TestMethodArgs): NoMethodError: undefined method `slice!' for nil:NilClass
/home/aycabta/rcodetools/test/test_method_args.rb:69:in `strip_dir!'
/home/aycabta/rcodetools/test/test_method_args.rb:86:in `block (2 levels) in <class:TestMethodArgs>'
=============================================================================================================================================================================================================================================
E
=============================================================================================================================================================================================================================================
Error: test_StructSubclass < <Struct: c>(TestMethodArgs): NoMethodError: undefined method `slice!' for nil:NilClass
/home/aycabta/rcodetools/test/test_method_args.rb:69:in `strip_dir!'
/home/aycabta/rcodetools/test/test_method_args.rb:86:in `block (2 levels) in <class:TestMethodArgs>'
=============================================================================================================================================================================================================================================
E
=============================================================================================================================================================================================================================================
Error: test_StructSubclass#method_in_c(TestMethodArgs): NoMethodError: undefined method `slice!' for nil:NilClass
/home/aycabta/rcodetools/test/test_method_args.rb:69:in `strip_dir!'
/home/aycabta/rcodetools/test/test_method_args.rb:86:in `block (2 levels) in <class:TestMethodArgs>'
=============================================================================================================================================================================================================================================
E
=============================================================================================================================================================================================================================================
Error: test_SubclassOfStructA < StructA(TestMethodArgs): NoMethodError: undefined method `slice!' for nil:NilClass
/home/aycabta/rcodetools/test/test_method_args.rb:69:in `strip_dir!'
/home/aycabta/rcodetools/test/test_method_args.rb:86:in `block (2 levels) in <class:TestMethodArgs>'
=============================================================================================================================================================================================================================================
E
=============================================================================================================================================================================================================================================
Error: test_SubclassOfStructA#method_in_b(TestMethodArgs): NoMethodError: undefined method `slice!' for nil:NilClass
/home/aycabta/rcodetools/test/test_method_args.rb:69:in `strip_dir!'
/home/aycabta/rcodetools/test/test_method_args.rb:86:in `block (2 levels) in <class:TestMethodArgs>'
=============================================================================================================================================================================================================================================
E
=============================================================================================================================================================================================================================================
Error: test_Symbol#method_in_Symbol(TestMethodArgs): NoMethodError: undefined method `slice!' for nil:NilClass
/home/aycabta/rcodetools/test/test_method_args.rb:69:in `strip_dir!'
/home/aycabta/rcodetools/test/test_method_args.rb:86:in `block (2 levels) in <class:TestMethodArgs>'
=============================================================================================================================================================================================================================================
E
=============================================================================================================================================================================================================================================
Error: test_Thread#method_in_Thread(TestMethodArgs): NoMethodError: undefined method `slice!' for nil:NilClass
/home/aycabta/rcodetools/test/test_method_args.rb:69:in `strip_dir!'
/home/aycabta/rcodetools/test/test_method_args.rb:86:in `block (2 levels) in <class:TestMethodArgs>'
=============================================================================================================================================================================================================================================
E
=============================================================================================================================================================================================================================================
Error: test_TrueClass#method_in_TrueClass(TestMethodArgs): NoMethodError: undefined method `slice!' for nil:NilClass
/home/aycabta/rcodetools/test/test_method_args.rb:69:in `strip_dir!'
/home/aycabta/rcodetools/test/test_method_args.rb:86:in `block (2 levels) in <class:TestMethodArgs>'
=============================================================================================================================================================================================================================================
E
=============================================================================================================================================================================================================================================
Error: test_UnboundMethod#method_in_UnboundMethod(TestMethodArgs): NoMethodError: undefined method `slice!' for nil:NilClass
/home/aycabta/rcodetools/test/test_method_args.rb:69:in `strip_dir!'
/home/aycabta/rcodetools/test/test_method_args.rb:86:in `block (2 levels) in <class:TestMethodArgs>'
=============================================================================================================================================================================================================================================
E
=============================================================================================================================================================================================================================================
Error: test_VariableArgsMethods#d(TestMethodArgs): NoMethodError: undefined method `slice!' for nil:NilClass
/home/aycabta/rcodetools/test/test_method_args.rb:69:in `strip_dir!'
/home/aycabta/rcodetools/test/test_method_args.rb:86:in `block (2 levels) in <class:TestMethodArgs>'
=============================================================================================================================================================================================================================================
E
=============================================================================================================================================================================================================================================
Error: test_VariableArgsMethods#db(TestMethodArgs): NoMethodError: undefined method `slice!' for nil:NilClass
/home/aycabta/rcodetools/test/test_method_args.rb:69:in `strip_dir!'
/home/aycabta/rcodetools/test/test_method_args.rb:86:in `block (2 levels) in <class:TestMethodArgs>'
=============================================================================================================================================================================================================================================
E
=============================================================================================================================================================================================================================================
Error: test_VariableArgsMethods#ds(TestMethodArgs): NoMethodError: undefined method `slice!' for nil:NilClass
/home/aycabta/rcodetools/test/test_method_args.rb:69:in `strip_dir!'
/home/aycabta/rcodetools/test/test_method_args.rb:86:in `block (2 levels) in <class:TestMethodArgs>'
=============================================================================================================================================================================================================================================
E
=============================================================================================================================================================================================================================================
Error: test_VariableArgsMethods#dsb(TestMethodArgs): NoMethodError: undefined method `slice!' for nil:NilClass
/home/aycabta/rcodetools/test/test_method_args.rb:69:in `strip_dir!'
/home/aycabta/rcodetools/test/test_method_args.rb:86:in `block (2 levels) in <class:TestMethodArgs>'
=============================================================================================================================================================================================================================================
E
=============================================================================================================================================================================================================================================
Error: test_VariableArgsMethods#s(TestMethodArgs): NoMethodError: undefined method `slice!' for nil:NilClass
/home/aycabta/rcodetools/test/test_method_args.rb:69:in `strip_dir!'
/home/aycabta/rcodetools/test/test_method_args.rb:86:in `block (2 levels) in <class:TestMethodArgs>'
=============================================================================================================================================================================================================================================
E
=============================================================================================================================================================================================================================================
Error: test_VariableArgsMethods#sb(TestMethodArgs): NoMethodError: undefined method `slice!' for nil:NilClass
/home/aycabta/rcodetools/test/test_method_args.rb:69:in `strip_dir!'
/home/aycabta/rcodetools/test/test_method_args.rb:86:in `block (2 levels) in <class:TestMethodArgs>'
=============================================================================================================================================================================================================================================
F
=============================================================================================================================================================================================================================================
Failure: test_all_tests(TestMethodArgs)
/home/aycabta/rcodetools/test/test_method_args.rb:94:in `test_all_tests'
91: end
92:
93: def test_all_tests
=> 94: assert_equal @@expected.length, @@result.length, @@result.join("\n")
95: end
96:
97: def test_without_n_option
<48> expected but was
<0>
=============================================================================================================================================================================================================================================
/home/aycabta/.rbenv/versions/2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- rcodetools/options (LoadError)
from /home/aycabta/.rbenv/versions/2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /home/aycabta/rcodetools/test/../bin/rct-meth-args:8:in `<main>'
F
=============================================================================================================================================================================================================================================
Failure:
</\AFixedArgsMethods\.singleton\ \(a1\)\n/> expected to be =~
<"">.
test_without_n_option(TestMethodArgs)
/home/aycabta/rcodetools/test/test_method_args.rb:100:in `test_without_n_option'
97: def test_without_n_option
98: first_line = "FixedArgsMethods.singleton (a1)"
99: command_output = `ruby '#{SCRIPT}' '#{DATAFILE}'`
=> 100: assert_match(/\A#{Regexp.quote(first_line)}\n/, command_output)
101: end
102: end
103:
=============================================================================================================================================================================================================================================
........................F
=============================================================================================================================================================================================================================================
Failure:
</^ extend VariableArgsMethods\x7F::AClass\x01/> expected to be =~
<"">.
test_extend(TestTAGS)
/home/aycabta/rcodetools/test/test_method_args.rb:128:in `test_extend'
125: end
126:
127: def test_extend
=> 128: assert_match(/^ extend VariableArgsMethods::AClass/, @@TAGS)
129: end
130:
131: def test_inheritance
=============================================================================================================================================================================================================================================
F
=============================================================================================================================================================================================================================================
Failure:
</^\cl\n\/.+method_args.data.rb,\d/> expected to be =~
<"">.
test_filename(TestTAGS)
/home/aycabta/rcodetools/test/test_method_args.rb:111:in `test_filename'
108: @@TAGS = `ruby '#{SCRIPT}' -t '#{DATAFILE}'`
109: def test_filename
110: # check whether full path is passed.
=> 111: assert_match %r!^\cl\n/.+method_args.data.rb,\d!, @@TAGS
112: end
113:
114: def test_singleton_method
=============================================================================================================================================================================================================================================
F
=============================================================================================================================================================================================================================================
Failure:
</^ include VariableArgsMethods\x7F::AClass\x01/> expected to be =~
<"">.
test_include(TestTAGS)
/home/aycabta/rcodetools/test/test_method_args.rb:124:in `test_include'
121: end
122:
123: def test_include
=> 124: assert_match(/^ include VariableArgsMethods::AClass/, @@TAGS)
125: end
126:
127: def test_extend
=============================================================================================================================================================================================================================================
F
=============================================================================================================================================================================================================================================
Failure:
</^class ASubClass < AClass\x7F::ASubClass\x01/> expected to be =~
<"">.
test_inheritance(TestTAGS)
/home/aycabta/rcodetools/test/test_method_args.rb:132:in `test_inheritance'
129: end
130:
131: def test_inheritance
=> 132: assert_match(/^class ASubClass < AClass::ASubClass/, @@TAGS)
133: end
134: end
=============================================================================================================================================================================================================================================
F
=============================================================================================================================================================================================================================================
Failure: <false> is not true.
test_instance_method(TestTAGS)
/home/aycabta/rcodetools/test/test_method_args.rb:120:in `test_instance_method'
117: end
118:
119: def test_instance_method
=> 120: assert @@TAGS.include?(" def initialize(arg) end::FixedArgsMethods#initialize4,74")
121: end
122:
123: def test_include
=============================================================================================================================================================================================================================================
F
=============================================================================================================================================================================================================================================
Failure: <false> is not true.
test_singleton_method(TestTAGS)
/home/aycabta/rcodetools/test/test_method_args.rb:116:in `test_singleton_method'
113:
114: def test_singleton_method
115: # including line/byte test
=> 116: assert @@TAGS.include?(" def self.singleton(a1) end::FixedArgsMethods.singleton3,45")
117: end
118:
119: def test_instance_method
=============================================================================================================================================================================================================================================
..........................................E
=============================================================================================================================================================================================================================================
Error: test_percent__Regexp(TestXMPCompletionFilter): Rcodetools::XMPCompletionFilter::NoCandidates: No candidates.
/home/aycabta/rcodetools/lib/rcodetools/completion.rb:288:in `candidates_with_class'
/home/aycabta/rcodetools/lib/rcodetools/completion.rb:295:in `candidates'
/home/aycabta/rcodetools/test/test_completion.rb:9:in `doit'
/home/aycabta/rcodetools/test/test_completion.rb:427:in `test_percent__Regexp'
424: end
425:
426: def test_percent__Regexp
=> 427: assert_equal(["kcode"], doit('%r!foo!.kcod',1))
428: assert_equal(["kcode"], doit('%r{foo}.kcod',1))
429: assert_equal(["kcode"], doit('%r!(!.kcod',1))
430: assert_equal(["kcode"], doit('%r{(}.kcod',1))
=============================================================================================================================================================================================================================================
.............................................................F
=============================================================================================================================================================================================================================================
Failure: test_percent__Regexp(TestXMPDocFilter)
/home/aycabta/rcodetools/test/test_doc.rb:380:in `test_percent__Regexp'
377: end
378:
379: def test_percent__Regexp
=> 380: assert_equal("Regexp#kcode", doit('%r!foo!.kcode',1))
381: assert_equal("Regexp#kcode", doit('%r{foo}.kcode',1))
382: assert_equal("Regexp#kcode", doit('%r!(!.kcode',1))
383: assert_equal("Regexp#kcode", doit('%r[(].kcode',1))
<"Regexp#kcode">(UTF-8) expected but was
<"-:1:in `method': undefined method `kcode' for class `Regexp' (NameError)">(ASCII-8BIT)
diff:
? Regexp#kc ode
? -:1:in `method': undefined method `kcode' for class ` ' (NameErr r)
? Encoding: UTF -8
? ASCII BIT
=============================================================================================================================================================================================================================================
.......E
=============================================================================================================================================================================================================================================
Error: test_initialize__test_script_1(TestXMPFilter): NoMethodError: undefined method `any_instance' for Rcodetools::XMPFilter:Class
/home/aycabta/rcodetools/test/test_xmpfilter.rb:75:in `test_initialize__test_script_1'
72: end
73:
74: def test_initialize__test_script_1
=> 75: XMPFilter.any_instance.stubs(:safe_require_code).returns("require 'test/unit'")
76: xmp = XMPFilter.new(:test_script=>"/path/to/test/test_ruby_toggle_file.rb",
77: :test_method=>"test_implementation_file_file_exist",
78: :filename=>"/path/to/lib/ruby_toggle_file.rb")
=============================================================================================================================================================================================================================================
E
=============================================================================================================================================================================================================================================
Error: test_initialize__test_script_2(TestXMPFilter): NoMethodError: undefined method `any_instance' for Rcodetools::XMPFilter:Class
/home/aycabta/rcodetools/test/test_xmpfilter.rb:90:in `test_initialize__test_script_2'
87: end
88:
89: def test_initialize__test_script_2
=> 90: XMPFilter.any_instance.stubs(:safe_require_code).returns("require 'test/unit'")
91: xmp = XMPFilter.new(:test_script=>"/path/to/test_ruby_toggle_file.rb",
92: :test_method=>"test_implementation_file_file_exist",
93: :filename=>"/path/to/ruby_toggle_file.rb")
=============================================================================================================================================================================================================================================
E
=============================================================================================================================================================================================================================================
Error: test_initialize__test_script_3(TestXMPFilter): NoMethodError: undefined method `any_instance' for Rcodetools::XMPFilter:Class
/home/aycabta/rcodetools/test/test_xmpfilter.rb:107:in `test_initialize__test_script_3'
104: def test_initialize__test_script_3
105: test_script = File.join(File.dirname(__FILE__), "data/sample_test_script.rb")
106: filename = File.join(File.dirname(__FILE__), "data/sample.rb")
=> 107: XMPFilter.any_instance.stubs(:safe_require_code).returns("require 'test/unit'")
108: xmp = XMPFilter.new(:test_script=>test_script, :test_method=>"4", :filename=>filename)
109:
110: evals_expected = [
=============================================================================================================================================================================================================================================
..E
=============================================================================================================================================================================================================================================
Error: test_interpreter_command_detect_rct_fork(TestXMPFilter): NoMethodError: undefined method `stubs' for Rcodetools::Fork:Module
/home/aycabta/rcodetools/test/test_xmpfilter.rb:64:in `test_interpreter_command_detect_rct_fork'
61: end
62:
63: def test_interpreter_command_detect_rct_fork
=> 64: Fork.stubs(:run?).returns true
65: xmp = XMPFilter.new(:interpreter=>"ruby", :detect_rct_fork => true)
66: assert_equal(%w[ruby -S rct-fork-client], xmp.interpreter_command)
67: end
=============================================================================================================================================================================================================================================
......F
=============================================================================================================================================================================================================================================
Failure: test_annotation_var_inference(TestXMPTestUnitFilter)
/home/aycabta/rcodetools/test/test_xmptestunitfilter.rb:32:in `test_annotation_var_inference'
29:
30: def test_annotation_var_inference
31: xmp = XMPTestUnitFilter.new
=> 32: assert_equal(ANNOTATION_VAR_INFERENCE_OUTPUT,
33: xmp.annotate(ANNOTATION_VAR_INFERENCE_INPUT).join(""))
34: end
35:
<"arr = []\nX = Struct.new(:foo, :bar)\nx = X.new(\"foo\", \"bar\")\narr << x\nassert_equal([x], arr)\nassert_kind_of(Array, arr)\nassert_equal(\"[#<struct X foo=\\\"foo\\\", bar=\\\"bar\\\">]\", arr.inspect)\nassert_equal(x, arr.last)\nassert_kind_of(X, arr.last)\nassert_equal(\"#<struct X foo=\\\"foo\\\", bar=\\\"bar\\\">\", arr.last.inspect)\n"> expected but was
<"arr = []\nX = Struct.new(:foo, :bar)\nx = X.new(\"foo\", \"bar\")\narr << x\nassert_kind_of(Array, arr)\nassert_equal(\"[#<struct X foo=\\\"foo\\\", bar=\\\"bar\\\">]\", arr.inspect)\nassert_kind_of(X, arr.last)\nassert_equal(\"#<struct X foo=\\\"foo\\\", bar=\\\"bar\\\">\", arr.last.inspect)\n">
diff:
arr = []
X = Struct.new(:foo, :bar)
x = X.new("foo", "bar")
arr << x
- assert_equal([x], arr)
assert_kind_of(Array, arr)
assert_equal("[#<struct X foo=\"foo\", bar=\"bar\">]", arr.inspect)
- assert_equal(x, arr.last)
assert_kind_of(X, arr.last)
assert_equal("#<struct X foo=\"foo\", bar=\"bar\">", arr.last.inspect)
=============================================================================================================================================================================================================================================
.F
=============================================================================================================================================================================================================================================
Failure: test_equality_assertions(TestXMPTestUnitFilter)
/home/aycabta/rcodetools/test/test_xmptestunitfilter.rb:39:in `test_equality_assertions'
36: def test_equality_assertions
37: xmp = XMPTestUnitFilter.new
38: assert_equal(["a = 1\n", "assert_equal(1, a)"], xmp.annotate("a = 1\na # \=>"))
=> 39: assert_equal(["a = {1,2}\n", "assert_equal({1=>2}, a)"],
40: xmp.annotate("a = {1,2}\na # \=>"))
41: assert_equal(["a = [1,2]\n", "assert_equal([1, 2], a)"],
42: xmp.annotate("a = [1,2]\na # \=>"))
<["a = {1,2}\n", "assert_equal({1=>2}, a)"]> expected but was
<["a = {1,2} # !> assigned but unused variable - a",
"assert_raise(){a}",
["# ~> -:1: syntax error, unexpected ',', expecting =>\n",
"# ~> a = {1,2}\n",
"# ~> ^\n"]]>
diff:
+ ["a = {1,2} # !> assigned but unused variable - a",
+ "assert_raise(){a}",
+ ["# ~> -:1: syntax error, unexpected ',', expecting =>\n",
? [ " a = {1,2}\n", "assert_equal({1=>2}, a)"]
? # ~>
+ "# ~> ^\n"]]
=============================================================================================================================================================================================================================================
..
Finished in 23.462950643 seconds.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
255 tests, 383 assertions, 32 failures, 54 errors, 0 pendings, 0 omissions, 1 notifications
66.2745% passed
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
10.87 tests/s, 16.32 assertions/s
rake aborted!
Command failed with status (1): [ruby -w -I"lib:ext/rcovrt" -I"/home/aycabta/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rake-11.2.2/lib" "/home/aycabta/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rake-11.2.2/lib/rake/rake_test_loader.rb" "test/test_completion.rb" "test/test_doc.rb" "test/test_functional.rb" "test/test_method_analyzer.rb" "test/test_method_args.rb" "test/test_options.rb" "test/test_ruby_toggle_file.rb" "test/test_xmpfilter.rb" "test/test_xmptestunitfilter.rb" ]
Tasks: TOP => default => test
(See full trace by running task with --trace)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment