It is nested and the rest of the setup is here;

    before(:each) do
      request.env["HTTP_ACCEPT"] = "application/json"
      @account = mock_account
      @account.stub!(:valid?)
      Account.stub!(:new).and_return(@account)
      @errors = { 'login' => 'Not available, try another!' }
      @account.stub!(:errors).and_return( @errors )
      @json = {:this => 'that'}.to_json
      @format = mock("format", :json => @json )
      controller.stub!(:respond_to).and_yield(@format)
    end

All the other specs pass the only failure is this being

should return conflict 409
expected: 409,
     got: 200 (using ==)

Thanks,
James

On Aug 3, 9:19 pm, "Pat Maddox" <[EMAIL PROTECTED]> wrote:
> >      it "should return conflict 409" do
> >        do_post
> >        response.response_code.should == 409
> >      end
>
> What is the failure message?
>
> Also, it looks like your before block has not set Account.new to
> return @account, and that @account is nil.  Is this a nested describe,
> and there's some other setup happening elsewhere?
>
> Pat
> _______________________________________________
> rspec-users mailing list
> [EMAIL PROTECTED]://rubyforge.org/mailman/listinfo/rspec-users
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to