Re: [rspec-users] Post call verification

2011-03-23 Thread Srushti
where the return value doesn't matter and you saving a little bit of noise in your tests. Nonetheless, here's the gem: http://rubygems.org/gems/stirlitz Thanks, Srushti On 22 March 2011 17:22, wrote: > > Date: Tue, 22 Mar 2011 06:52:02 -0500 > From: David Chelimsky > To: rs

Re: [rspec-users] Attempting to speed up my controller specs: using before all fails?

2011-10-12 Thread Srushti
with your specific situation, except to say I've faced weird issues like this with "before(:all)" in the past, and have generally tried to stay away from it these days. Also, the largest amount of time is generally involved in actually loading up rails itself. Can you confirm that there's a significant amount of time taken to execute your controller action? Srushti http://c42.in ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

[rspec-users] Post call verification

2011-03-19 Thread Srushti Ambekallu
Hey all, I would like to be able to be able to have mocks where I can make all the calls and assert that it was called afterwards. This would be especially useful when asserting on a doing-method whose return value is not being considered. e.g. service = mock(ExternalService) ExternalS

Re: [rspec-users] Post call verification

2011-03-23 Thread Srushti Ambekallu
On 24/03/11 12:29 AM, David Chelimsky wrote: [moved your post to the bottom for consistency with this thread] On Mar 23, 2011, at 1:41 PM, Srushti wrote: On 22 March 2011 17:22, <mailto:rspec-users-requ...@rubyforge.org>> wrote: Date: Tue, 22 Mar 2011 06:52:02 -0500 Fr

Re: [rspec-users] before(:each) <- need some clarification

2011-04-27 Thread Srushti Ambekallu
an error: undefined local variable or method `text' am doing something wrong? thanks! Sergio, You'll want to create text as an instance variable ('@text'). The other option is to use 'let' as in: let (:text) { "string here" }

Re: [rspec-users] let vs ivar w/ before block

2011-09-30 Thread Srushti Ambekallu
erred yet, and hence the block hasn't executed. "Foo.all" in the case above returns an empty array, which wouldn't have been the case with an instance object created in "before(:each)". Srushti http://c42.in ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] let vs ivar w/ before block

2011-09-30 Thread Srushti Ambekallu
o, but inevitably a few months down the line, I'll end up wasting a couple of hours on a weird failing test, until I look closely enough to notice the ":all". So, unless I'm doing something that's prohibitively expensive (I haven't found anything that would qualify

[rspec-users] RSpec & JRuby

2012-03-14 Thread Srushti Ambekallu
ad. Do you guys have any issues using RSpec with JRuby? Any advice on the matter would be greatly appreciated. Thanks, Srushti http://rubymonk.com ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Testing Model Attributes That Are Updated In a Controller

2012-03-21 Thread Srushti Ambekallu
u confirm that those two fairly common reasons these sorts of things usually fail for me don't apply? Then we can start looking at other possible issues. Also, I would probably be more specific in my assertion by doing @user.stripe_customer.should == Stripe::Customer.last.id Thanks, Srushti

Re: [rspec-users] Rspec: How to mock class method

2012-07-26 Thread Srushti Ambekallu
e.org >> http://rubyforge.org/mailman/listinfo/rspec-users > > ___ > rspec-users mailing list > rspec-users@rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users I think the thing people don't usually realise is