I’m new to BDD and rspec, but I am very intrigued.
I tried installing rspec and rspec_on_rails into my Rails app, but I am
having some trouble.
I chose to install both as plugins, as the documentation suggests. I
checked out the CURRENT tag from svn, and copied the rspec and
rspec_on_rails directories into my app’s vendor/plugins directory. Then
I ran script/generate rspec, which created its files. Everything seemed
ok, so I wrote up a little model spec, put it in spec/models, and ran
rake spec. I did put require “File.dirname(FILE) +
‘/…/spec_helper.rb’” at the top of my spec file.
The message and call stack I get back is:
load_missing_constant': uninitialized constant Spec::Rails (NameError) from c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/dependencies.rb:452:inconst_missing’
gem_original_require' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:inrequire’
require' from c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/dependencies.rb:342:innew_constants_in’
... 18 levels... from
load_files' from C:/src/Aptana/ir/vendor/plugins/rspec/lib/spec/runner/options.rb:83:inrun_examples’
Command ruby -I"C:/src/Aptana/ir/vendor/plugins/rspec/lib"
dor/plugins/rspec/bin/spec” “spec/models/image_spec.rb” --options
As you can see, I am running Windows.
Does anyone have any idea what I am doing wrong?