Following the installation instructions, I have installed the rake gem, and tried to install FRUIT. Unfortunately, it fails with the message below. Running Ruby 2.0.
$ rake install
"rubygems/package_task"
ruby fruit_processor_test.rb
Warning: you should require 'minitest/autorun' instead.
Warning: or add 'gem "minitest"' before 'require "minitest/autorun"'
From:
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/test/unit.rb:3:in `<top (required)>'
fruit_processor_test.rb:1:in `<main>'
MiniTest::Unit::TestCase is now Minitest::Test. From /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/test/unit/testcase.rb:8:in `<module:Unit>'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/test/unit.rb:670:in `<class:Runner>': undefined method `_run_suite' for class `Test::Unit::Runner' (NameError)
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/test/unit.rb:255:in `<module:Unit>'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/test/unit.rb:9:in `<module:Test>'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/test/unit.rb:8:in `<top (required)>'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from fruit_processor_test.rb:1:in `<main>'
rake aborted!
Command failed with status (1): [ruby fruit_processor_test.rb...]
/Users/fonnescj/Repositories/fruit_3.4.1/fruit_processor_gem/rakefile:75:in `block (2 levels) in <top (required)>'
/Users/fonnescj/Repositories/fruit_3.4.1/fruit_processor_gem/rakefile:74:in `chdir'
/Users/fonnescj/Repositories/fruit_3.4.1/fruit_processor_gem/rakefile:74:in `block in <top (required)>'
Tasks: TOP => install => default => test
(See full trace by running task with --trace)
Could you see if
works?
In my environment,
For now I can't help you much as I've just installed macOS Sierra and still setting up develop environment.
Seemingly it's related to version of minitest.
After updating minitest from 4.3.2 to 5.9.1 by [ sudo gem install minitest ],
I began to have similar error "MiniTest::Unit::TestCase is now Minitest::Test. ..."
For latest minitest, fruit_processor_test.rb needs some modification.
Replace
with
Replace twice
with
Replace "assert_raise" with "assert_raises"
Whole "assert_noting_raised( ... )" must be commented out.
Thanks for the prompt reply. I can confirm that the changes above fix the test.