开发者

Gems in plugins often not getting loaded, when running that plugin test

For example in open_id_authentication plugin. Inside folder test/test_helper.rb inside that plugin, it got:

require 'test/unit'
require 'rubygems'

gem 'activesupport'
require 'active_support'

gem 'actionpack'
require 'action_controller'

gem 'mocha-0.9.8'
require 'mocha'

gem 'ruby-openid'
require 'openid'

RAILS_ROOT = File.dirname(__FILE__) unless defined? RAILS_ROOT
require File.dirname(__FILE__) + "/../lib/open_id_authentication"

But whenever I run the test (both by ctrl + R in TextMate or ruby open_id_authentication.rb -v in Terminal, it returned Gem::LoadError: Could not fin开发者_如何学God RubyGem mocha-0.9.8 (>= 0)

I have installed mocha gem by running both in terminal, just to made sure:

gem install mocha
sudo gem install mocha

And I even added this line in config/environment.rb

config.gem 'mocha'

so what should I do now?


Not sure about textmate but your call should be

ruby -Itest open_id_authentication.rb

to include the test dir with your test helper file.


Try and run the following command:

sudo bundle install moca
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜