On Mon, Jun 16, 2008 at 10:23 PM, Andrew Selder <[EMAIL PROTECTED]> wrote:
> David,
>
> Valid point about the method needing some refactoring. But another key rule
> of refactoring is to have passing tests before refactoring.
Catch 22 indeed. Are you familiar w/ Michael Feathers' book Working
Effe
David,
Valid point about the method needing some refactoring. But another key
rule of refactoring is to have passing tests before refactoring.
This is one of the things that's a minor annoyance I have about rails,
you can't associate views with models. The problem with the
refactoring sug
On Jun 16, 2008, at 9:19 PM, Andrew Selder wrote:
I updated the spec to look like this:
it "should render show template" do
do_get
controller.stub_render(:partial => "/properties/
map_info_box", :object => anything())
response.should render_template('show')
end
and I sti
I updated the spec to look like this:
it "should render show template" do
do_get
controller.stub_render(:partial => "/properties/
map_info_box", :object => anything())
response.should render_template('show')
end
and I still get the same failure and back trace.
In add
On Jun 16, 2008, at 8:59 PM, Andrew Selder wrote:
Here's the back trace
1)
'SearchesController handling GET /searches/1 should render show
template' FAILED
expected "show", got "properties/_map_info_box"
/Users/aselder/BostonLogic/one_system/vendor/plugins/rspec/lib/spec/
expectations.rb:52
Here's the back trace
1)
'SearchesController handling GET /searches/1 should render show
template' FAILED
expected "show", got "properties/_map_info_box"
/Users/aselder/BostonLogic/one_system/vendor/plugins/rspec/lib/spec/
expectations.rb:52:in `fail_with'
/Users/aselder/BostonLogic/one_syste
On Jun 16, 2008, at 2:58 PM, Andrew Selder wrote:
Hi all,
I have a controller I'm trying to spec out, and I'm running into
some issues with render_to_string.
Basically, the show gets an array of objects, calls render_to_string
for each of them, and then renders the show template.
So I h
Hi all,
I have a controller I'm trying to spec out, and I'm running into some
issues with render_to_string.
Basically, the show gets an array of objects, calls render_to_string
for each of them, and then renders the show template.
So I have the standard spec:
it "should render show