On Sat, Oct 4, 2008 at 1:38 PM, David Chelimsky <[EMAIL PROTECTED]> wrote: > On Sat, Oct 4, 2008 at 1:06 PM, Luis Lavena <[EMAIL PROTECTED]> wrote: >> On Sat, Oct 4, 2008 at 2:58 PM, David Chelimsky <[EMAIL PROTECTED]> wrote: >>> On Sat, Oct 4, 2008 at 11:54 AM, Fernando Perez <[EMAIL PROTECTED]> wrote: >>>> How do you go plugin-less for RSpec? The plugins require you to generate >>>> some files, so how do you do that without a plugin? Is there still a >>>> rake task in the gem to generate the required files? >>> >>> I'll post this up on the wiki, but the steps are: >>> >>> [sudo] gem install rspec-rails >>> script/generate rspec >>> >>> That's it. >>> >>> rspec is a dependency of rspec-rails, so installing the rspec-rails >>> gem will also install the rspec gem. >>> >>> Once installed, if you type 'script/generate' with no arguments, >>> you'll see all the rspec generators listed. 'script/generate rspec' >>> generates the files necessary to work with rspec without having to >>> install the plugins in your app. >>> >> >> It doesn't :-P >> >> Just tried that on a fresh application, and when call script/generate >> rspec it just not find it and don't execute it :-P >> >> Also, going to the gem version instead of the plugin requires a new >> set of script files, since they try to look for vendor/plugins/ >> instead of doing: >> >> require 'rubygems' >> require 'spec' >> >> Last, but not least, you need to do >> >> config.gem 'rspec-rails', :lib => 'spec/rails' since Rails will try by >> default to load 'rspec-rails' module instead. >> >> Wow, lot of details :-P > > Hmmm. Wonder if this is a windows thing. Or maybe you have an older > version of rubygems? It works as I prescribed for me with the > following: > > $ ruby -v > ruby 1.8.6 (2008-03-03 patchlevel 114) [universal-darwin9.0] > $ gem -v > 1.3.0 > $ rails -v > Rails 2.1.1 > $ spec --version > rspec 1.1.8 > > Besides the OS, what's different in your system?
Also - the script files prepend vendor/plugins/rspec/lib to the path, but if they are not there, there shouldn't be a problem. That just ensures that if you DO have the plugin installed it takes precedence over the gem. > > >> >> Cheers, >> -- >> Luis Lavena >> AREA 17 >> - >> Human beings, who are almost unique in having the ability to learn from >> the experience of others, are also remarkable for their apparent >> disinclination to do so. >> Douglas Adams > _______________________________________________ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users