Nick Hoffman wrote:
On 2008-11-18, at 15:49, Ben Mabey wrote:
Nick Hoffman wrote:
Before writing specs for a one-to-many relationship between two
models, I did some research and found that some people were creating
proxy mocks, and others were using Matthew Heidemann's
#stub_association! (whi
On 2008-11-19, at 12:26, Chris Flipse wrote:
I've actually taken this old gem and enhanced it a bit
module Spec::Mocks::Methods
def stub_association!(association_name, methods_to_be_stubbed ={})
mock_assn = Spec::Mocks::Mock.new(association_name.to_s)
stub_association_with(association_
On 2008-11-18, at 15:49, Ben Mabey wrote:
Nick Hoffman wrote:
Before writing specs for a one-to-many relationship between two
models, I did some research and found that some people were
creating proxy mocks, and others were using Matthew Heidemann's
#stub_association! (which essentially doe
On 2008-11-18, at 07:33, Rahoul Baruah wrote:
On 18 Nov 2008, at 05:41, Nick Hoffman wrote:
Before writing specs for a one-to-many relationship between two
models, I did some research and found that some people were
creating proxy mocks, and others were using Matthew Heidemann's
#stub_assoc
I've actually taken this old gem and enhanced it a bit
module Spec::Mocks::Methods
def stub_association!(association_name, methods_to_be_stubbed ={})
mock_assn = Spec::Mocks::Mock.new(association_name.to_s)
stub_association_with(association_name, mock_assn,
methods_to_be_stubbed)
end
Nick Hoffman wrote:
Before writing specs for a one-to-many relationship between two
models, I did some research and found that some people were creating
proxy mocks, and others were using Matthew Heidemann's
#stub_association! (which essentially does that for, but in a nice,
DRY way):
http:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 18 Nov 2008, at 05:41, Nick Hoffman wrote:
Before writing specs for a one-to-many relationship between two
models, I did some research and found that some people were creating
proxy mocks, and others were using Matthew Heidemann's
#stub_ass
On 18 Nov 2008, at 05:41, Nick Hoffman wrote:
Before writing specs for a one-to-many relationship between two
models, I did some research and found that some people were creating
proxy mocks, and others were using Matthew Heidemann's
#stub_association! (which essentially does that for, but i
Before writing specs for a one-to-many relationship between two
models, I did some research and found that some people were creating
proxy mocks, and others were using Matthew Heidemann's
#stub_association! (which essentially does that for, but in a nice,
DRY way):
http://www.ruby-forum.