我正在开发宝石。有一个名为 /spec 的文件夹,其中包含 2 个文件:
#spec_helper.rb
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
require 'my_gem'
#my_gem_spec.rb
describe MyGem do
it 'should have a version number' do
MyGem::VERSION.should_not be_nil
end
#............
end
然后我运行它
rspec spec
/var/lib/gems/1.9.1/gems/rspec-core-2.12.2/lib/rspec/core/configuration.rb:491:in `add_formatter': Formatter 'specdoc' unknown - maybe you meant 'documentation' or 'progress'?. (ArgumentError)
from /var/lib/gems/1.9.1/gems/rspec-core-2.12.2/lib/rspec/core/configuration_options.rb:30:in `block in configure'
from /var/lib/gems/1.9.1/gems/rspec-core-2.12.2/lib/rspec/core/configuration_options.rb:30:in `each'
from /var/lib/gems/1.9.1/gems/rspec-core-2.12.2/lib/rspec/core/configuration_options.rb:30:in `configure'
from /var/lib/gems/1.9.1/gems/rspec-core-2.12.2/lib/rspec/core/command_line.rb:21:in `run'
from /var/lib/gems/1.9.1/gems/rspec-core-2.12.2/lib/rspec/core/runner.rb:80:in `run'
from /var/lib/gems/1.9.1/gems/rspec-core-2.12.2/lib/rspec/core/runner.rb:17:in `block in autorun'
这是什么意思?如何摆脱它?
这是捆绑包的输出
bundle install
Using rake (10.0.3)
Using diff-lcs (1.1.3)
Using my_gem (0.0.1) from source at .
Using rspec-core (2.12.2)
Using rspec-expectations (2.12.1)
Using rspec-mocks (2.12.1)
Using rspec (2.12.0)
Using bundler (1.3.0.pre.4)