Hi Chuck,
If you just call "print" and "getch" then you should be able to test for these
by checking for these messages on your object under test:
subject.should_receive(:print)
Hope that helps?
Bas
On 11 May, 2013, at 11:36 AM, Charles Thornton wrote:
> I use: STDOUT.should_receive(:put
Chelimsky wrote:
>> On Wed, Aug 22, 2012 at 6:43 AM, Bas Vodde wrote:
>>>
>>> On 22 Aug, 2012, at 7:25 PM, David Chelimsky wrote:
>>>
>>>> On Wed, Aug 22, 2012 at 12:56 AM, Bas Vodde wrote:
>>>>>
>>>>> Hiya all,
>&
was one of the cases where my default excepted behavior from
RSpec was different from what the API wanted. Therefore, I had to dive in the
RSpec doc to see how I could pass the messageā¦.
Bas
On 22 Aug, 2012, at 7:25 PM, David Chelimsky wrote:
> On Wed, Aug 22, 2012 at 12:56 AM, Bas
Hiya all,
I was trying to get and_raise to raise an exception filled with a message and I
was struggling with the API for a while (not on the latest RSpec, but assume it
didn't change).
Based on that, I have a suggestion for improvement. My first attempt was to
mirror how I use raise, so I tr
JB is right.
Sometimes, for clarity, it is useful to add should_not, but for functionality
it is usually not needed.
Bas
On 22 Aug, 2012, at 4:12 AM, J. B. Rainsberger wrote:
> On Tue, Aug 21, 2012 at 5:02 PM, Andrew Premdas wrote:
> I want to write
>
> it "should ..." do
> Client.shoul
Indeed it should be :)
Tnx.
Bas
On 27-Jul-2012, at 2:42 PM, Srushti Ambekallu wrote:
> On 27-Jul-2012, at 11:34 AM, Bas Vodde wrote:
>
>>
>> Hi,
>>
>> How about:
>>
>> Message.should_receive(:Message.method_a).with(xxx).and_
Hi,
How about:
Message.should_receive(:Message.method_a).with(xxx).and_return(true)
Bas
On 27-Jul-2012, at 1:31 PM, bill gate wrote:
> Hi, I have two model: Message, User
>
> message.rb
> ```
> class Message < ActiveRecord::Base
> class << self
>def method_a(args)
> [1,2]
>end
How about writing a spec instead of an email :)
Bas
On 20-Jun-2012, at 5:58 PM, farh...@deeproot.co.in wrote:
> Hi all,
>
> As I am new to rspec, would like to know how to go about learning to write
> tests in rspec.
>
> Regards,
> Farheen Zahara
>
> _
ub.com/rspec/rspec-mocks/commit/fb9c76c2e40b4b25f4dcc5de95f8c60319b6d9c1.
> It'll be fixed in the next release (2.10).
>
> Cheers,
> David
>
> --
> David Chelimsky
> Sent with Sparrow
>
> On Sunday, April 15, 2012 at 4:48 PM, David Chelimsky wrote:
>
>&g
Hiya all,
I've got a quick question related to RSpec. I was test-driving some code and
ended up in an endless loop. I was surprised by this, but traced it down to the
mock not failing on additional calls but only in the end. Let me explain.
I was writing code like this:
subject.wrapper.sho
10 matches
Mail list logo