我的GEMFILE中有以下内容:
group :development do gem 'rspec-rails' gem 'annotate-models' end group :test do gem 'rspec' gem 'webrat' gem 'spork' gem 'factory_girl_rails' end
‘rspec’和’rspec-rails’有什么区别?
解决方法
如他们的维基页面所述:
rspec-rails extends RSpec and Ruby on
Rails so you can specify the behavIoUr
of your rails web-app.
https://github.com/dchelimsky/rspec/wiki/rails
而rspec宝石不支持rails,为普通旧的ruby应用程序提供测试框架.