62mkv
62mkv

Reputation: 1542

Can not run any unit test for Redmine with Ruby 2.0.0 under Windows. Is that at all possible?

Any attempt to run unit tests for Redmine, like:

ruby test/unit/issue_custom_field_test.rb

produces this:

DL is deprecated, please use Fiddle

C:/Develop/Ruby200/lib/ruby/gems/2.0.0/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:274:in `require': cannot load such file --
mocha/setup (LoadError)
        from C:/Develop/Ruby200/lib/ruby/gems/2.0.0/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:274:in `block in require'
        from C:/Develop/Ruby200/lib/ruby/gems/2.0.0/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:240:in `load_dependency'
        from C:/Develop/Ruby200/lib/ruby/gems/2.0.0/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:274:in `require'
        from C:/Develop/Redmine/src/redmine/test/test_helper.rb:36:in `<top (required)>'
        from C:/Develop/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
        from C:/Develop/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
        from test/unit/issue_custom_field_test.rb:18:in `<main>'

I've googled everywhere I could. No luck so far.

Any ideas? Would be great.

PS: mocha is installed:

C:\Develop\Redmine\src\redmine>gem list | grep -B 2 -A 2 mocha

mini_portile (0.6.2)
minitest (5.8.3, 4.3.2)
mocha (1.1.0)
mysql2 (0.3.20 x86-mingw32)
net-ldap (0.12.1)

Upvotes: 3

Views: 355

Answers (1)

62mkv
62mkv

Reputation: 1542

It appears, that "bundle install" was initially run with "--without development test" option.. at least that's what was said in .bundle/config

Removing the file, and running

gem uninstall mocha
bundle install

did the trick. Somehow, "system" gems are different from "bundler" gems. May be one day I'll begin to understand this...

Upvotes: 3

Related Questions