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
>
Content-Type: text/plain; charset="us-ascii"
On Mar 22, 2011, at 4:13 AM, Tom Stuart wrote:
> On 19 Mar 2011, at 13:35, David Chelimsky wrote:
>
>> On Mar 18, 2011, at 10:37 AM, Srushti Ambekallu wrote:
>>
>>> Hey all,
&g
On 28/04/11 1:25 AM, Sergio Ruiz wrote:
i am setting up a few objects that are interrelated for use in an rspec
test..
something like:
describe Dimension do
before(:each) do
text = "string here"
end
it "should puts string" do
puts text
end
end
when i run this, i get an error: undefined
On 30/09/11 3:58 PM, David Chelimsky wrote:
On Sep 30, 2011, at 3:31 PM, Patrick J. Collins wrote:
Proper usage, sure, but the memoization is only within each example - not
across examples. That way you can do this:
let(:thing) { Thing.new }
it "does something" do
thing.blah
thing.whatev
On 30/09/11 6:24 PM, Patrick J. Collins wrote:
Proper usage, sure, but the memoization is only within each example - not
across examples. That way you can do this:
So regarding objects persisting over multiple examples-- I was told repeatedly
by experienced RSpec peeps to not use before(:all)..
We're working on a project with a bunch of padrino services running on JRuby
1.6.5. Currently, the tests are written Test::Unit, but we want to move to
writing specs. We tried rspec but that seemed to fail, until we looked closer
and found that JRuby 1.6.6 has fixed whatever the issue was.
We a
On 21-Mar-2012, at 6:31 AM, Tyler DeWitt wrote:
> I've got a controller that updates some attributes of a model:
>
> def confirmation
>@cart = current_cart
>customer = Stripe::Customer.create(description: current_user.email, card:
> params[:stripeToken])
>current_user.update_attribut
On 27-Jul-2012, at 11:34 AM, Bas Vodde wrote:
>
> Hi,
>
> How about:
>
> Message.should_receive(:Message.method_a).with(xxx).and_return(true)
I think that ought to be:
Message.should_receive(:method_a).with(xxx).and_return(true)
>
> Bas
>
> On 27-Jul-2012, at 1:31 PM, bill gate wrot