[rspec-users] Just a quick question on David's new-controller-examples

Shane Mingins smingins at elctech.com
Tue Oct 14 23:07:47 EDT 2008


BTW .... great post, thanks :-)

I was wondering the thinking of this one ....

describe "responding to POST /accounts" do

   describe "with failed save" do

       it "should create a new account" do
         Account.should_receive(:new).with({'these' =>  
'params'}).and_return(mock_account(:save => false))
         post :create, :account => {:these => 'params'}

compared to the similar example in describe "with successful save".

The expected behaviour seems the same and I wondered why it would not  
be pulled into just the responding to POST /accounts block?


Shane Mingins
ELC Technologies (TM)
1921 State Street
Santa Barbara, CA 93101

Phone: +64 4 568 6684
Mobile: +64 21 435 586
Email:  smingins at elctech.com
AIM:     ShaneMingins
Skype: shane.mingins

(866) 863-7365 Tel - Santa Barbara Office
(866) 893-1902 Fax - Santa Barbara Office

+44 020 7504 1346 Tel - London Office
+44 020 7504 1347 Fax - London Office


Privacy and Confidentiality Notice:
The information contained in this electronic mail message is intended  
for the named recipient(s) only. It may contain privileged and  
confidential information. If you are not an intended recipient, you  
must not copy, forward, distribute or take any action in reliance on  
it. If you have received this electronic mail message in

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4000 bytes
Desc: not available
URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20081015/1ca35d23/attachment.bin>

More information about the rspec-users mailing list