[rspec-users] problems matching generated html output...

Patrick J. Collins patrick at collinatorstudios.com
Thu Nov 3 19:25:42 EDT 2011

> I realise this isn't the answer you're looking for, but I'm curious: where
> did you get the idea that a presenter should know anything about HTML?

Maybe I am using the wrong terminology then.  I always thought presenters were
classes that output presentational content...  If you have a view with a lot of
dynamic content, the conditional logic ends up building to the point where the
view is unreadable, and if you try to refactor out into helper methods, you end
up having something like

module MyHelper

  def something(lol)

  def modify_lol(lol)

  ... etc


A class helps to eliminate this problem by giving you a way to instantiate with
instance variables and cut down on having pass around the same variable to
multiple helpers......  I've always called that a presenter, and in this case
it deals with HTML.  Am I totally on crack?

Patrick J. Collins

More information about the rspec-users mailing list