[rspec-users] Specting controller post

2010-02-02 Thread Stephen Smithstone
A bit stuck here being new to ruby and rspec Im trying to spec out a rails controller and using machinist to generate a model so in my spec i have it "should create new client" do     // creates me a hash of generated values using Foregey     client = Client.plan     // specify that I shou

Re: [rspec-users] Specting controller post

2010-02-02 Thread Stephen Smithstone
by rails ? if so my setup must be wrong On 2 February 2010 12:07, J. B. Rainsberger wrote: > On Tue, Feb 2, 2010 at 04:24, Stephen Smithstone > wrote: > > > A bit stuck here being new to ruby and rspec > > Welcome. I hope you like the experience. Good news: we've

Re: [rspec-users] Specting controller post

2010-02-02 Thread Stephen Smithstone
seems the blueprint is not inheriting from active record base so no #attributes on the class, have to look for another solution or pass in some parameters my self On 2 February 2010 12:26, Stephen Smithstone wrote: > cheers for the response , seem that attributes is missing from hash on

Re: [rspec-users] Specting controller post

2010-02-02 Thread Stephen Smithstone
reasons both in favor of not mocking and in favor of mocking the behavior of your models. I just like the ones in favor of not mocking a bit more :) Cheers On Tue, Feb 2, 2010 at 10:26 AM, Stephen Smithstone wrote: cheers for the response , seem that attributes is missing from hash o

Re: [rspec-users] please help me learn how to use rspec!

2010-02-18 Thread Stephen Smithstone
I to am starting to learn Rspec so i had an attempt at your problem and i came up with this solution http://github.com/ssmithstone/learning_rspec I will expand on this code if you want the render nothing if called with ajax was a puzzler for me as not come across that before as learning rails

Re: [rspec-users] please help me learn how to use rspec!

2010-02-18 Thread Stephen Smithstone
just a note not the greatest of code but just an attempt On 18/02/2010 21:17, Stephen Smithstone wrote: I to am starting to learn Rspec so i had an attempt at your problem and i came up with this solution http://github.com/ssmithstone/learning_rspec I will expand on this code

Re: [rspec-users] Stubbing before_filters with RSpec and stub!

2010-06-12 Thread Stephen Smithstone
What I would do maybe not the best solution is to control what is returned in current user so if you want to test that the redirect works then make current_user return nil then the redirect should work and to get the filter to pass stub the current user to return an instance that has an id tha

[rspec-users] making sure a model acts_as_authentic

2010-12-06 Thread Stephen Smithstone
Is there any way to spec that a model should acts_as_authentic which is from the authlogic plugin im using rspec-1 Stephen Smithstone ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users