I have forked a ruby gem and made some updates. I need to run the gem tests and add my new tests and ensure all tests are succeeding.
The forked ruby gem is using rspec tests. How can I run these test?
The rub test includes rubbing your ruby across a smooth (but hard) surface, like glass, and seeing if the gem leaves any color behind. Glass only has a hardness of 5 on the Mohs scale, so it's much softer than actual rubies. Real rubies and some gems shouldn't leave any color behind, but cheap fakes or imitations can.
You can check your Ruby version by running ruby --version , and you can check your RubyGems version by running gem --version . If you need to upgrade Ruby, use your ruby version manager's instructions. If you need to upgrade RubyGems, run gem update --system .
Developer file that specifies the attributes of a RubyGems . GEM package; saves information such as the author, a description, an example usage, and the usage license; saved in a simple plain text format.
Usually rake
is sufficient to run all the tests, regardless of whether they're RSpec, Cucumber, etc. If you want to invoke RSpec directly try running rspec spec
instead, or if the gem is using an unconventionally named test directory, just use rspec <directory_name>
.
Note: Most new gems these days use Bundler to manage dependencies, so if you don't have the appropriate dependencies and there's a Gemfile in the root, then run "bundle install" first to get them. Then run with bundle exec ...
(e.g., bundle exec rspec spec
).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With