On 21 Oct 2009, at 19:18, Stephen Eley wrote:
On Wed, Oct 21, 2009 at 1:12 PM, Carl Graff wrote:
In truth, due to my inexperience and confusion, mocks seem to slow my
development more than just creating real objects. But since there
has been
so much effort to put these into testing framework
On Wed, Oct 21, 2009 at 1:12 PM, Carl Graff wrote:
>
> In truth, due to my inexperience and confusion, mocks seem to slow my
> development more than just creating real objects. But since there has been
> so much effort to put these into testing frameworks, I think it must be
> important to try and
Hi Carl,
Some thoughts below...
On 21 Oct 2009, at 18:12, Carl Graff wrote:
Well i just started using RSpec about a week ago and mostly I was
just trying to learn how to use mocks as I could have easily just
created the real object in this case.
Anyway, I had a real object, that needed to
Well i just started using RSpec about a week ago and mostly I was just
trying to learn how to use mocks as I could have easily just created the
real object in this case.
Anyway, I had a real object, that needed to contain a hash of a yet to
be created object, which itself contained a hash of a
On 21 Oct 2009, at 08:41, Pat Maddox wrote:
wait why do you want to do this?? Just use a regular hash and do
state-based assertions on it. Or determine the role that this
hash-like thing is doing, and use a mock to define a proper interface.
Ashley's solution works but I am very skeptical tha
wait why do you want to do this?? Just use a regular hash and do
state-based assertions on it. Or determine the role that this
hash-like thing is doing, and use a mock to define a proper interface.
Ashley's solution works but I am very skeptical that the approach is
a good one. Can you post som
Ashley Moran wrote:
On 20 Oct 2009, at 17:36, Carl Graff wrote:
Is it possible to create a stub that returns hash values.
For example I would like to convert this:
@siteItem = stub('plmSiteItem', :one => "uno")
To something like this:
@siteItem = stub('plmSiteItem', {'one' => 'uno', 'two' =>
On 20 Oct 2009, at 17:36, Carl Graff wrote:
Is it possible to create a stub that returns hash values.
For example I would like to convert this:
@siteItem = stub('plmSiteItem', :one => "uno")
To something like this:
@siteItem = stub('plmSiteItem', {'one' => 'uno', 'two' => 'dos'} )
So that
Is it possible to create a stub that returns hash values.
For example I would like to convert this:
@siteItem = stub('plmSiteItem', :one => "uno")
To something like this:
@siteItem = stub('plmSiteItem', {'one' => 'uno', 'two' => 'dos'} )
So that I can do this:
@siteItem['one'] should ==