[rspec-users] using rspec in a non-rails environment

S Ahmed sahmed1020 at gmail.com
Mon Apr 23 17:26:13 UTC 2012

My folder structure is as follows:



My spec_helper has:

require 'rubygems'
require 'rspec'

RSpec.configure do |config|

My class1_spec.rb has:

require 'spec_helper'
require '../../lib/class1'

describe Class1 do
  it "should do something"

How do I require my class1 correct, when I run:

rspec spec/lib/class1_spec.rb I am getting:

1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file --
../../lib/class1.rb (LoadError)

Also, in a non-rails app, what kind of things do you put in the spec_helper
normally? any popular config settings that I should know about?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20120423/08eab308/attachment.html>

More information about the rspec-users mailing list