Re: [rspec-users] Testing Custom Methods

2011-11-15 Thread Tony Spore
On Mon, Nov 14, 2011 at 11:49 PM, Justin Ko wrote: > Tony, this text right here is considered "top posting" because it is > *above* the previous posts. Now, scroll down and you'll see my "bottom > post". > > On Nov 13, 2011, at 11:03 PM, Tony Spore wrote: > > Thanks David. > I am getting a long w

Re: [rspec-users] Testing Custom Methods

2011-11-15 Thread Justin Ko
Tony, this text right here is considered "top posting" because it is *above* the previous posts. Now, scroll down and you'll see my "bottom post". On Nov 13, 2011, at 11:03 PM, Tony Spore wrote: > Thanks David. > I am getting a long way now. > -Thanks, > Tony Spore > CEO > SaasSoft LLC > (805)

[rspec-users] Testing Custom methods

2011-11-14 Thread Tony Spore
I am attempting to test a custom method, and totally bombing out. describe Record do describe '#save_cf_data' do before :each do @record = mock_model(Record) end it "should have a birthday" do @record.save_cf_data({"final_outputs"=>["birth_day"=>["3"]]}) @record.bir

Re: [rspec-users] Testing Custom Methods

2011-11-13 Thread Tony Spore
Thanks David. I am getting a long way now. -Thanks, Tony Spore CEO SaasSoft LLC (805) 253-1277 saassoft.com On Sun, Nov 13, 2011 at 4:29 PM, David Chelimsky wrote: > > On Nov 13, 2011, at 4:54 PM, Tony Spore wrote: > > On Sun, Nov 13, 2011 at 8:12 AM, David Chelimsky wrote: > >> On Nov 12, 201

Re: [rspec-users] Testing Custom Methods

2011-11-13 Thread David Chelimsky
On Nov 13, 2011, at 4:54 PM, Tony Spore wrote: > On Sun, Nov 13, 2011 at 8:12 AM, David Chelimsky wrote: > On Nov 12, 2011, at 6:27 PM, Tony Spore wrote: > >> >> >> >> >> -Thanks, >> Tony Spore >> >> >> >> On Sat, Nov 12, 2011 at 2:14 PM, David Chelimsky >> wrote: >> On Nov 12, 2011,

Re: [rspec-users] Testing Custom Methods

2011-11-13 Thread Tony Spore
Sorry David, I am getting this error: ailure/Error: @record.save_cf_data(result) NoMethodError: 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.first Here is my Gist of my code that I

Re: [rspec-users] Testing Custom Methods

2011-11-13 Thread David Chelimsky
On Nov 12, 2011, at 6:27 PM, Tony Spore wrote: > > > > > -Thanks, > Tony Spore > > > > On Sat, Nov 12, 2011 at 2:14 PM, David Chelimsky wrote: > On Nov 12, 2011, at 3:33 PM, Tony Spore wrote: > >> I am attempting to test a custom method, and totally bombing out. >> describe Record do >>

Re: [rspec-users] Testing Custom Methods

2011-11-12 Thread Tony Spore
Great thanks! So now I am at least calling the method - But when I try to add in the params that I'm being sent I keep returning nil - Failure/Error: @record.save_cf_data(result) NoMethodError: You have a nil object when you didn't expect it! You might have expected an instanc

Re: [rspec-users] Testing Custom Methods

2011-11-12 Thread David Chelimsky
On Nov 12, 2011, at 3:33 PM, Tony Spore wrote: > I am attempting to test a custom method, and totally bombing out. > describe Record do > describe '#save_cf_data' do > before :each do > @record = mock_model(Record) mock_model creates a test double, or pure mock ... > end >

[rspec-users] Testing Custom Methods

2011-11-12 Thread Tony Spore
I am attempting to test a custom method, and totally bombing out. describe Record do describe '#save_cf_data' do before :each do @record = mock_model(Record) end it "should have a birthday" do @record.save_cf_data({"final_outputs"=>["birth_day"=>["3"]]}) @record.bir