[rspec-users] autotest debugger?

Jamal Soueidan lists at ruby-forum.com
Thu Nov 1 06:18:51 EDT 2007


I keep facing problems with autotest, and I don't know what's happening
in the background, is there anyway to know what's happening while

@user = User.new
@user.email = "testcom"
@user.errors.on(:email).should_not be_empty

...throws error failure

- You have a nil object when you didn't expect it!
- You might have expected an instance of Array.
- The error occurred while evaluating nil.empty?

...but when I type this in ./script/console

>> @user = User.new
=> #<User id: nil, email: nil, nickname: nil, password: nil, logged_at:
nil, created_at: nil>
>> @user.valid?
=> false
>> @user.email = "asd@"
>> @user.errors.on 'email'
=> "is invalid"

So how do you guys test things out and see what's happening behind? I'm
lost :(

Thanks in advance :)
Posted via http://www.ruby-forum.com/.

More information about the rspec-users mailing list