[rspec-users] Rails: Specing libraries
chad at spicycode.com
Sat Dec 22 14:20:37 EST 2007
In most cases you could just create a lib folder under spec with your
new file in it. For example if you have:
You would have:
That starts out something like:
require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
describe MyExtension do
And that should about do it.
On Dec 22, 2007, at 1:17 PM, Caleb Land wrote:
> I was reading the documentation on using rails with rspec and I
> didn't see anything about how to spec libraries in the rails /lib
> directory so that they're integrated into the whole spec::rails
> Where should I put specs for my libraries, and what's the best way
> to require the files that I'm testing in my spec?
> I've never used rspec before, and I'm new to rails, so I'm huge newb.
> Caleb Land
> rspec-users mailing list
> rspec-users at rubyforge.org
More information about the rspec-users