简体   繁体   中英

What's the Difference between the Rspec and Rspec-Rails Gem?

I have the following in my 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 

What's the difference between 'rspec' and 'rspec-rails'?

As stated on their wiki page:

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

Whereas the rspec gem has no support for rails, providing a testing framework for plain old ruby applications.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM