[rspec-users] Accessing the model class from within an rspec-rails spec

2008-10-28 Thread Cameron Booth
Hi everybody, New to the list, so apologies if this has been answered elsewhere, but I didn't find it. I'm trying to build up a plugin of useful rspec macros for rails development, eg. things like: it_should_return_success it_should_redirect_to { some_url } I'm basing my ideas off of some stuff

[rspec-users] Including spec/rails/mocks into other classes

2008-10-29 Thread Cameron Booth
Hi all, So my potentially crazy but I think good idea right now is to take the factory_girl gem and adapt it to generate stubbed models instead of actual ActiveRecord objects that get saved to the DB. My main reasoning there is that I like the syntax they've set up and some of the tools under the

Re: [rspec-users] Accessing the model class from within an rspec-rails spec

2008-10-29 Thread Cameron Booth
ECTED]> > Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes > > > On Oct 28, 2008, at 9:09 AM, Cameron Booth wrote: > > > Hi everybody, > > > > New to the list, so apologies if this has been answered elsewhere, > > but I didn't

Re: [rspec-users] Accessing the model class from within an rspec-rails spec

2008-10-29 Thread Cameron Booth
n the class, it's not, it seems to be looking only for a module? def described_type description_parts.find {|part| part.is_a?(Module)} end Is there something I'm missing? Cameron On Tue, Oct 28, 2008 at 8:09 AM, Cameron Booth <[EMAIL PROTECTED]>wrote: >

[rspec-users] Accessing the model class from within an rspec-rails spec

2008-10-29 Thread Cameron Booth
Hi everybody, New to the list, so apologies if this has been answered elsewhere, but I didn't find it. I'm trying to build up a plugin of useful rspec macros for rails development, eg. things like: it_should_return_success it_should_redirect_to { some_url } I'm basing my ideas off of some

[rspec-users] concerned_with, and maybe require_dependency issues only when running specs?

2008-11-03 Thread Cameron Booth
Hi all, So in the interests of keeping a few areas of my code a bit under control, I've been investigating the concept of "concerned_with" as described here: http://paulbarry.com/articles/2008/08/30/concerned-with-skinny-controller-skinny-model Basically allowing me to have: /app/models/user.rb