My folder structure is as follows:
/myapp/
/myapp/lib/class1.rb
/myapp/rspec/spec_helper.rb
/myapp/rspec/lib/class1_spec.rb
My spec_helper has:
require 'rubygems'
require 'rspec'
RSpec.configure do |config|
end
My class1_spec.rb has:
require 'spec_helper'
require '../../lib/class1'
On Mon, Apr 23, 2012 at 12:26 PM, S Ahmed sahmed1...@gmail.com wrote:
My folder structure is as follows:
/myapp/
/myapp/lib/class1.rb
/myapp/rspec/spec_helper.rb
/myapp/rspec/lib/class1_spec.rb
My spec_helper has:
require 'rubygems'
^^ If you've installed rspec as a gem and you're
ok have to lookup what rspec/autorun does as oppose to just 'require
rspec'
thanks, it is now working :) feels good! I've always been tied to rails,
seems like I was spoiled and not sure how to do basic things in ruby
On Mon, Apr 23, 2012 at 1:42 PM, David Chelimsky