黄瓜 + R规格+铁轨 + Webrat,factor_girl + MacOSX 上的自动测试...在 gem.config 中?

发布于 2024-08-15 19:13:24 字数 597 浏览 6 评论 0原文

我找到了如何使用的示例:

http://www.claytonlz.com/index.php/2009/04/how-to-setup-rspec-cucumber-webrat-rcov-and-autotest-on-leopard /

但我尝试找到解决方案,使用以下方法将所有宝石放入 gem.config (enviroment.rb) gemcutter gem 存储库(现在这是首选的 gems 存储库?)

也许有人已经正确配置了 gem.config 依赖项:

Cucumber + RSpec + Rails + Factor_Girl + Webrat ... MacOSX 上的自动测试(与 Growl)

我想在 gem.config 中拥有所有需要的宝石,也许我期望很高;)

问候, 安杰伊

I found example how to use on:

http://www.claytonlz.com/index.php/2009/04/how-to-setup-rspec-cucumber-webrat-rcov-and-autotest-on-leopard/

but I try to find solution to put this all gems to gem.config (enviroment.rb) with using
gemcutter gem repository (this is prefered gems repository now ?)

Maybe some one have properly configured gem.config dependency for:

Cucumber + RSpec + Rails + Factor_Girl + Webrat ... autotest on MacOSX (with Growl)

I want to have all needed gems in gem.config, maybe I expecting to much ;)

Regards,
Andrzej

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

真心难拥有 2024-08-22 19:13:24

您可以简单地执行以下操作

sudo gem install cucumber cucumber-rails rspec rspec-rails webrat database_cleaner factory_girl faker
./script/generate rspec
./script/generate cucumber --rspec --webrat

它将设置您的 config/environments/cucumber.rb
您可以像我下面那样手动添加缺少的内容

config.gem 'database_cleaner', :lib => false, :version => '>=0.4.3' unless File.directory?(File.join(Rails.root, 'vendor/plugins/database_cleaner'))
config.gem 'webrat',           :lib => false, :version => '>=0.6.0' unless File.directory?(File.join(Rails.root, 'vendor/plugins/webrat'))
config.gem 'rspec-rails',      :lib => 'spec/rails', :version => '>=1.3.2' unless File.directory?(File.join(Rails.root, 'vendor/plugins/rspec-rails'))
config.gem 'rspec',            :lib => 'spec', :version => '>=1.3.0' unless File.directory?(File.join(Rails.root, 'vendor/plugins/rspec'))
config.gem 'cucumber'
config.gem 'cucumber-rails',   :lib => 'cucumber/rails', :version => '>=0.2.4' unless File.directory?(File.join(Rails.root, 'vendor/plugins/cucumber-rails'))
config.gem "faker"
config.gem "factory_girl"

You can simply do the following

sudo gem install cucumber cucumber-rails rspec rspec-rails webrat database_cleaner factory_girl faker
./script/generate rspec
./script/generate cucumber --rspec --webrat

It will setup your config/environments/cucumber.rb
You can add the missing ones manually like I did below

config.gem 'database_cleaner', :lib => false, :version => '>=0.4.3' unless File.directory?(File.join(Rails.root, 'vendor/plugins/database_cleaner'))
config.gem 'webrat',           :lib => false, :version => '>=0.6.0' unless File.directory?(File.join(Rails.root, 'vendor/plugins/webrat'))
config.gem 'rspec-rails',      :lib => 'spec/rails', :version => '>=1.3.2' unless File.directory?(File.join(Rails.root, 'vendor/plugins/rspec-rails'))
config.gem 'rspec',            :lib => 'spec', :version => '>=1.3.0' unless File.directory?(File.join(Rails.root, 'vendor/plugins/rspec'))
config.gem 'cucumber'
config.gem 'cucumber-rails',   :lib => 'cucumber/rails', :version => '>=0.2.4' unless File.directory?(File.join(Rails.root, 'vendor/plugins/cucumber-rails'))
config.gem "faker"
config.gem "factory_girl"
妄司 2024-08-22 19:13:24

只需添加 :source => “http://gemcutter.org” 到每个 config.gem 行。我不确定是否所有宝石都已在 Gemcutter 上!

Just add :source => "http://gemcutter.org" to every config.gem line. I'm not sure if all gems are on Gemcutter already though!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文