[rspec-users] custom matcher and yielding too block

2011-03-19 Thread Jonathan Rochkind
Using the 'new' way of defining custom matchers explained here: https://github.com/dchelimsky/rspec/wiki/Custom-Matchers I'm having trouble figuring out how to write a custom matcher that yields an object to a block where more matchers can be called on it. For instance, I'd like my actual spe

[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] custom matcher and yielding too block

2011-03-19 Thread David Chelimsky
On Mar 15, 2011, at 10:27 AM, Jonathan Rochkind wrote: > Using the 'new' way of defining custom matchers explained here: > https://github.com/dchelimsky/rspec/wiki/Custom-Matchers > > I'm having trouble figuring out how to write a custom matcher that yields an > object to a block where more mat

Re: [rspec-users] Post call verification

2011-03-19 Thread David Chelimsky
On Mar 18, 2011, at 10:37 AM, Srushti Ambekallu wrote: > 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 >

[rspec-users] [rspec-rails] warning about polymorphism on child objects

2011-03-19 Thread Lille
Hi, I just ran into kind of an issue with child models in a one-to-one relationship who are also in a polymorphic association, i.e., their foreign key is kept by another model, e.g., 'Comment'. So, the path for a child might be "human_parents/1/child", while the path to the polymorphic associatio

Re: [rspec-users] Post call verification

2011-03-19 Thread Matt Wynne
On 19 Mar 2011, at 13:35, David Chelimsky wrote: > On Mar 18, 2011, at 10:37 AM, Srushti Ambekallu wrote: > >> 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 as

Re: [rspec-users] Controller Spec & DataMapper Chaining

2011-03-19 Thread Sid Wood
Thanks Ken, but when I said I was new to RSpec I didn't mean I was THAT new! ;o) I think people aren't grasping the DataMapper chaining that is at the root of my testing confusion. I managed to come up with a solution that I've outlined here http://pastie.org/1690040 Basically, I mocked out a cou

Re: [rspec-users] Controller Spec & DataMapper Chaining

2011-03-19 Thread Matt Wynne
On 19 Mar 2011, at 17:49, Sid Wood wrote: > Thanks Ken, but when I said I was new to RSpec I didn't mean I was THAT new! > ;o) > > I think people aren't grasping the DataMapper chaining that is at the root of > my testing confusion. I managed to come up with a solution that I've outlined > he

Re: [rspec-users] experimenting with stub in irb with RSpec2

2011-03-19 Thread Phil Thompson
An update: This is now achieved with: require 'rspec/mocks/standalone' -- Posted via http://www.ruby-forum.com/. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users