Sendorf
Sendorf

Reputation: 33

How do I test a gem that modifies ActiveRecord with different DB's?

I have created a gem that adds a new method to the class ActiveRecord::Base. I have tested the gem manually (creating a rails application) and it works, but I would like to create an automatic test battery to test it properly. Is there any gem I can use as reference?

Thanks!!

Sergio.

Upvotes: 3

Views: 127

Answers (1)

Chris Kimpton
Chris Kimpton

Reputation: 5541

From the Travis config for Rails, it seems to run it several times against each DB:

https://github.com/rails/rails/blob/master/ci/travis.rb

Crude but effective :)

Upvotes: 1

Related Questions