Dave
Dave

Reputation:

Essential Ruby gems?

We're starting to standardise on a Ruby-based testing framework, having had some very good results out of RSpec and Cucumber-based testing recently. As this is a large enterprise, we're going to attempt to put together a "standard" set of Ruby gems for testing, knowing we're only ever going to get it ~90% right because of the broad mix of technologies being used.

Key technologies we've identified so far that we need to be able to support:

As a starting point, we've decided we want the following set of gems installed (in addition to those that come with Ruby itself):

For Silverlight apps, we hope to be able to test them through IronRuby, but that's very much unknown territory for us at this point.

Two questions:

Thanks in advance

Upvotes: 3

Views: 1522

Answers (4)

ocodo
ocodo

Reputation: 30248

A few very nice gems for irb/rails console...

  • Pry - gives you the ability to ls, cd around available objects. Show the source for methods, display rails models... and a significant amount of other features

  • irbtools - a bunch of tools collected together (including wirb, hirb, interactive_editor (let's you open emacs, vim etc.), coderay, ... list on the github page)

Upvotes: 1

Rishav Rastogi
Rishav Rastogi

Reputation: 15492

Zentest, it is very Important for testing

Also Mongrel or Passenger for application deployment

Upvotes: 1

Omar Qureshi
Omar Qureshi

Reputation: 9093

Nokogiri for parsing XML is another one

Upvotes: 1

Simone Carletti
Simone Carletti

Reputation: 176412

I would add

  • Mocha. If you use Cucumber, Rspec or ActiveSupport, chances are it will get loaded automatically if installed.
  • Test::Unit or RSpec. The first one isn't a GEM, it's a standard Ruby library. Personally I'm a Test::Unit guy rather than a RSpec user, however you might want to give RSpec a try.
  • Shoulda Shoulda consists of test macros, assertions, and helpers added on to the Test::Unit framework.
  • Remarkable Remarkable is a port of all Shoulda macros to RSpec.

Also you might want to use

  • RCov to check your LOC

Not strictly related to tests but always about code quality:

  • Flay analyzes ruby code for structural similarities.
  • Flog shows you the most torturous code you wrote.
  • Reek a code smells detector for ruby
  • Roodi parses your Ruby code and warns you about design issues you have based on the checks that is has configured.

Upvotes: 4

Related Questions