thanks Ben - this works nicely
On Fri, Sep 5, 2008 at 4:18 PM, Ben Mabey <[EMAIL PROTECTED]> wrote: > Greg Hauptmann wrote: >> Hi, >> >> is there a way to create spec tests (including directories) for an >> existing set of models/controllers? (i.e. as opposed to the generate >> options that rspec provides when you are creating models/controllers >> etc to start with) >> >> Tks >> _______________________________________________ >> rspec-users mailing list >> rspec-users@rubyforge.org >> http://rubyforge.org/mailman/listinfo/rspec-users >> > > The two quick and easy ways I can think of are: > > a) Run the ./script/generate/rspec... commands for each model and > controller. When prompted to overwrite the existing model/controller > just say no (the specs will still be created.) > b) If your using TextMate on OSx with the rspec bundle you can use the > "switch command" (Ctl-Shift Down) while on the model/controller and it > will prompt you if you want to create a matching spec for that file. > > The maybe quicker but harder way I can think of is to create your own > simple generator/script that iterates over the existing files and > creates spec files for them if needed. > > HTH, > Ben > _______________________________________________ > rspec-users mailing list > rspec-users@rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users > _______________________________________________ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users