一个简单的方法来运行测试宝石? [英] An easy way to run tests on a gem?

查看:102
本文介绍了一个简单的方法来运行测试宝石?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有一种快速简单的方法来测试已经安装在本地的gem?像:

Is there a quick and easy way to test a gem which is already installed locally? Like:

gem test gem_name_to_test






ruby​​gems文档说一个人可以将 gem:--run-tests 放入〜/ .gemrc 文件中,以在安装gem时运行单元测试。


rubygems docs says one can put gem: --run-tests in ~/.gemrc file to run unit tests when a gem is installed. I could not make it work though and that is not exactly what I need.

推荐答案

有gem test命令,它可能会或可能不会是你正在寻找的。它会再次运行测试包并将它们发送到 test.rubygems.org

There is "gem test" command, which may or may not be what you are looking for. It run tests agains the package and sends them to test.rubygems.org.

gem install rubygems-test
gem test gem_name_to_test

这篇关于一个简单的方法来运行测试宝石?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆