[rspec-users] RSpec'ing model association callbacks

2008-03-17 Thread roberto belardo
Hi all, i'm learning rspec and i must admit i really love it. But at the time i started learning it, i already developed my models classes and their callbacks. Now i'm trying to get a 100% coverage of my code but i cannot reach it because i do not understand how to spec my callbacks. Look at this

Re: [rspec-users] RSpec'ing model association callbacks

2008-03-17 Thread roberto belardo
Wow, as expected this works. Thank you very much for your help. Do you think this approach for model callbacks specing is right (apart from the number of expectations per example)? --- David Chelimsky <[EMAIL PROTECTED]> ha scritto: > On Mon, Mar 17, 2008 at 5:53 AM, roberto belardo

[rspec-users] Multiple should sentences one lambda

2008-03-23 Thread roberto belardo
Hi all, i have one problem. I'm just trying to get the restful_authentication plugin work, but i discovered that its rspec tests are not working, because of this: it 'requires password confirmation' do lambda do u = Factory.create_user(:password_confirmation => nil) u.errors.on(:password

[rspec-users] Rspecing this simple controller it is driving me mad...

2008-04-06 Thread roberto belardo
Hi all, here i am again with this stupid problem in rspecing this controller action: CommentsController def create @comment = Comment.new(params[:comment]) @user = User.find(params[:user_id]) [16] @comment.author = @user @comment.save end

Re: [rspec-users] Rspecing this simple controller it is driving me mad...

2008-04-06 Thread roberto belardo
<[EMAIL PROTECTED]> ha scritto: > > On 6.4.2008, at 14.20, roberto belardo wrote: > > > Hi all, > > here i am again with this stupid problem in > rspecing > > this controller action: > > > > > > CommentsContro

Re: [rspec-users] Rspecing this simple controller it is driving me mad...

2008-04-08 Thread roberto belardo
Everything seemed so fine, but when i tried to investigate a little i discovered this tremendous behaviour of the spec: --- CommentsController def create @comment = Comment.new(params[:comment]) @user = User.find(params[:user_id]) @comment.author = 'foobar'

Re: [rspec-users] Rspecing this simple controller it is driving me mad...

2008-04-12 Thread roberto belardo
e someone who knows how to spec this? Help needed. --- Jarkko Laine <[EMAIL PROTECTED]> ha scritto: > > On 8.4.2008, at 23.06, roberto belardo wrote: > > > Everything seemed so fine, but when i tried to > > investigate a little i discovered this tremendous >