It was great episode. Just one think I really didn't like was defining presents method in base presenter. It could be something optional to use but in most cases we have 1-1 relation which can be expressed in BasePresenter in following way:
ruby
defself.inherited(klass)
name = klass.name.match(/(\w+)Presenter/).captures.first.underscore
define_method(name) { @object }
end
Please open an issue on zeus on github
If you would like to use zeus, guard and parallel tests together check out https://github.com/sevos/zeus-parallel_tests
@1: Because this makes it easily configurable from, for example yml file.
@3: plan.subscriptions.build is equivalent of Subscription.new(plan: plan)
Hey Ryan!
It was great episode. Just one think I really didn't like was defining presents method in base presenter. It could be something optional to use but in most cases we have 1-1 relation which can be expressed in BasePresenter in following way:
what do you think?
why? Any particular reason for that?
and by the way: you frget that presenter initalizer takes 2 arguments
btw: :this #looks ugly for me
I added spec/support/presenters.rb file and I require it from spec_helper.rb:
the later instruction allows me simple check if presenter renders a template inside test
presenter.method.should render_template('blah/_blah')