开发者

unable to load rspec generator in rails 2.3.5

开发者 https://www.devze.com 2023-03-24 15:30 出处:网络
i am working on rails 2.3.5 where i want to us Rspec for testing purpose. I have installed rspec gem but not able to list rspec in generator\'s list. I am referring https://github.com/rspec/rspec-rail

i am working on rails 2.3.5 where i want to us Rspec for testing purpose. I have installed rspec gem but not able to list rspec in generator's list. I am referring https://github.com/rspec/rspec-rails.

group :development, :test do
  gem "rspec", "~> 1.3"
  gem "rspec-rails", "~> 1.3"
开发者_运维知识库end

Thanks.


If you are on rails 2.3.5 you will have to install two plugins :

ruby script/plugin install git://github.com/dchelimsky/rspec.git -r 'refs/tags/1.2.9'

and

ruby script/plugin install git://github.com/dchelimsky/rspec-rails.git -r 'refs/tags/1.2.9'

Then check the rspec generate list

ruby script/generate rspec

Please check https://github.com/dchelimsky/rspec/wiki/rails for further details.

Hope this helps.

0

精彩评论

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