On Mon, Jun 23, 2008 at 11:08 AM, s.ross <[EMAIL PROTECTED]> wrote:
> I'm trying to verify (using expectations) that a backgroundrb job is being
> started. I ran across this thread:
> http://rubyforge.org/pipermail/rspec-users/2007-October/004115.html, in
> which Pat Maddox conditionally loads back
This is what worked for me back then:
In our spec_helper I did:
class Object; remove_const :MiddleMan; end
MiddleMan = Object.new
And then the spec looked like:
it "should call the admin email worker" do
MiddleMan.should_receive(:new_worker).with(:class
=> :admin_email_worker, :args =
I'm trying to verify (using expectations) that a backgroundrb job is
being started. I ran across this thread: http://rubyforge.org/pipermail/rspec-users/2007-October/004115.html
, in which Pat Maddox conditionally loads backgroundrb. However, I
don't see why the original construct that started
Well, at least now we know this is nothing to do with RSpec. My
suggestion is that you comment out the code which will be executed
during a creation, bit by bit in User (such as before_save) and try to
create a user. In this way you can pinpoint where the problem is.
On Mon, Jun 23, 2008 at 10:26
Yi Wen wrote:
> You don't have attr_accessor :password, :password_confirmation in
> User, do you? You may want to add this and try again
I had :password, I've added :password_confirmation but still the same:
>> u = User.create!(:login => "test", :email => "[EMAIL PROTECTED]", :password
>> => "te
You don't have attr_accessor :password, :password_confirmation in
User, do you? You may want to add this and try again
On Mon, Jun 23, 2008 at 9:59 AM, Csongor Bartus <[EMAIL PROTECTED]> wrote:
> Yi Wen wrote:
>> fire up script/console and copy line 82 and try it out. and report the
>> result here
Yi Wen wrote:
> fire up script/console and copy line 82 and try it out. and report the
> result here.
>> u = User.create!(:login => "test", :email => "[EMAIL PROTECTED]", :password
>> => "test123", :password_confirmation => "test123")
NoMethodError: You have a nil object when you didn't expect it
fire up script/console and copy line 82 and try it out. and report the
result here.
On Fri, Jun 20, 2008 at 11:11 AM, Csongor Bartus <[EMAIL PROTECTED]> wrote:
> David Chelimsky wrote:
>
>>
>> Try using create! or save! - I'll bet the record is not being saved
>> correctly and you're not seeing th