* Use the new `expect().to` syntax
* Avoid general fixtures by minimizing usage of `let` and `subject`
* Define as few support classes as possible, and use them for name
lookup only - all behavior is introduced by stubbing
Automatic delegation of methods is now achieved with `delegate_all`,
which includes the new AutomaticDelegation module.
Manual delegation is achieved using the standard Active Support
`delegate` method, which is enhanced so that `to: :source` is the
default.
The problem with using Cucumber is that it runs the dummy app in the
test environment. Because the view context behaviour is dependent on
environment, we need to test it running on an actual server.
My decorator was silly. When UTC's today is different
than today's today, the decorator would be wrong. Now
we make sure to convert both to utc before making
the comparison
This test tests the following Draper features:
1) finders
2) decorates
3) using a decorated method
It also is the first test that verifies that the whole Cucumber setup
actually works properly.
I've embedded a little Rails app so that we can write cuke tests and
make sure that stuff doesn't break. Woo!
This was generated by making a rails engine, then copying just the
app over.
Thanks @nashby for fixing my stupid bug with sqlite3; it had to be
added as a development dependency. ❤️