On Sat, Sep 6, 2008 at 8:00 PM, David Chelimsky [EMAIL PROTECTED]wrote:
class Property
def add_marker_to(map)
map.add_marker Marker.new(address, latitude, longitude, contents)
end
end
That reduces the surface contact between the Property and the Map even
more.
The surface contact
On 2008-09-05, at 18:22, Jonathan Linowes wrote:
On Sep 5, 2008, at 5:44 PM, Nick Hoffman wrote:
Property.stub!(:find).and_return mock_property1, mock_property2
try
Property.stub!(:find).and_return( [mock_property1, mock_property2] )
Thanks Jonathan and David. That was a silly mistake.
On Sat, Sep 6, 2008 at 2:32 PM, Nick Hoffman [EMAIL PROTECTED] wrote:
On 2008-09-05, at 18:22, Jonathan Linowes wrote:
On Sep 5, 2008, at 5:44 PM, Nick Hoffman wrote:
Property.stub!(:find).and_return mock_property1, mock_property2
try
Property.stub!(:find).and_return( [mock_property1,
On 2008-09-06, at 15:58, David Chelimsky wrote:
Well, without changing the underlying semantics, you can clean up the
syntax a bit like this:
mock_property1 = stub('property', :address = '400 Bloor Street',
:latitude = 12.34, :longitude = 56.78)
Of course, that doesn't address your question
203
204 map.should_receive(:add_marker).with mock_property1.address,
mock_property1.latitude, mock_property1.longitude, marker1_contents
205 map.should_receive(:add_marker).with mock_property2.address,
mock_property2.latitude, mock_property2.longitude, marker2_contents
It looks
On Sat, Sep 6, 2008 at 4:48 PM, Nick Hoffman [EMAIL PROTECTED] wrote:
On 2008-09-06, at 15:58, David Chelimsky wrote:
Well, without changing the underlying semantics, you can clean up the
syntax a bit like this:
mock_property1 = stub('property', :address = '400 Bloor Street',
:latitude =
On Sat, Sep 6, 2008 at 5:25 PM, Mark Wilden [EMAIL PROTECTED] wrote:
203
204 map.should_receive(:add_marker).with mock_property1.address,
mock_property1.latitude, mock_property1.longitude, marker1_contents
205 map.should_receive(:add_marker).with mock_property2.address,
On Sat, Sep 6, 2008 at 9:57 PM, David Chelimsky [EMAIL PROTECTED] wrote:
On Sat, Sep 6, 2008 at 4:48 PM, Nick Hoffman [EMAIL PROTECTED] wrote:
On 2008-09-06, at 15:58, David Chelimsky wrote:
Well, without changing the underlying semantics, you can clean up the
syntax a bit like this:
So, after reading all of those fantastic emails discussing testing
behaviour vs state, I decided to try mocking and stubbing a couple of
methods. I think I did well on my first one, but I'm not sure what the
best way to spec the following method is:
1 class RentalMap
...
166 def
On Sep 5, 2008, at 5:44 PM, Nick Hoffman wrote:
Property.stub!(:find).and_return mock_property1, mock_property2
try
Property.stub!(:find).and_return( [mock_property1, mock_property2] )
Want to help others? Become a certified
On Fri, Sep 5, 2008 at 4:44 PM, Nick Hoffman [EMAIL PROTECTED] wrote:
So, after reading all of those fantastic emails discussing testing behaviour
vs state, I decided to try mocking and stubbing a couple of methods. I think
I did well on my first one, but I'm not sure what the best way to spec
11 matches
Mail list logo