[rspec-users] Best practices for developing a rails plugin (extending ActiveRecord) with rspec?

Scott Taylor scott at railsnewbie.com
Wed Dec 17 11:22:05 EST 2008


On Dec 17, 2008, at 10:26 AM, Ingo Weiss wrote:

> Hi all,
>
> I am developing a rails plugin/gem with rspec. The plugin extends  
> ActiveRecord, so the specs basically needs a complete environment  
> with database access to run. What is a good way to set this up in a  
> way that can be bundled with the plugin, maybe in the form of a  
> stripped-down rails and a sqlite db?

Here's what I've used for FixtureReplacement in the past (which linoj  
generously contributed):

https://gist.github.com/3525b4cb43f0710a0ac0

Scott


More information about the rspec-users mailing list