开发者

Changing rspec version during development

I'm a newbie in Ruby 开发者_StackOverflow社区on Rails. I just started with the RoR Tutorial from Michael Hartl (klick). I'm at 5.2.1 where we learn about Integration_tests.

When I run rails generate integration_test layout_links it generates rspec files but when running rspec spec I get:

You have already activated rspec-core 2.6.3, but your Gemfile requires rspec-core 2.x.x and all tests fail.

and if I play around a little I get SystemStackError:stack level too deep and all tests fail.

Probably my Gemsets are messed up or I need another version of rspec-rails running.

Part of my Gemfile.lock looks like:

rake (0.9.1)
rb-fsevent (0.4.0)
rspec (2.6.0)
  rspec-core (~> 2.6.0)
  rspec-expectations (~> 2.6.0)
  rspec-mocks (~> 2.6.0)
rspec-core (2.6.3)
rspec-expectations (2.6.0)
  diff-lcs (~> 1.1.2)
rspec-mocks (2.6.0)
rspec-rails (2.0.0.beta.18)
  rspec (>= 2.0.0.beta.14)
  webrat (>= 0.7.0)
sqlite3 (1.3.3)
thor (0.14.6)

EDIT: Solved. I changed the rspec-rails version to 2.6.1 and added 'webrat' to :development and :test gem sets. Works like a charm... :-)


This can usually be fixed by doing bundle exec rspec spec instead of just rspec spec

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜