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
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
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
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
<[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
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'
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
>