Commit Graph

14 Commits

Author SHA1 Message Date
Jeff Casimir f4797ed1e1 Hacking around Rails 4.2 incompatibilities 2015-03-26 21:48:51 -06:00
Andrew Haines 0a09c096a6 Only define MongoidPostDecorator when using Mongoid 2013-06-02 21:23:08 +01:00
Andrew Haines 4b933ef39d Rename `source` to `object`
Closes #501
2013-04-30 14:10:52 +01:00
Andrew Haines 2de0592214 Add integration specs for Decoratable.decorate 2013-03-03 11:13:32 +00:00
Andrew Haines fa2d5274a6 More integration specs 2013-01-16 16:30:53 +00:00
Andrew Haines c510a92a3c Add integration test for AM::Serialization support
...which shows that we need to always `delegate :attributes`
2013-01-16 16:28:55 +00:00
Andrew Haines c6f8aaa2b2 Remove `allows`, `denies` and `denies_all` from Decorator
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.
2013-01-14 03:57:47 +00:00
Chris Heald 731995a5fe Provide support for class methods. Reintroduce the decorates class method, which may be used to hint at which class to delegate class methods to. 2012-12-02 14:16:03 +00:00
Andrew Haines cef5e628be Integration tests for all environments
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.
2012-11-12 19:59:43 +00:00
Steve Klabnik bf84303a62 Fix the build.
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
2012-11-02 19:19:39 -07:00
Andrew Haines e1214d97b6 Remove .decorates method 2012-10-31 17:55:38 +00:00
Steve Klabnik bfc33537b9 Add features around url helpers 2012-10-24 07:24:03 -04:00
Steve Klabnik 9f869ab84c Updating with latest master.
Needed to turn Base -> Decorator, and also add
the test db back to the repo so that travis will
have a copy.
2012-10-19 14:16:16 -03:00
Steve Klabnik 6b5b0a77ee Added first integration test
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.
2012-10-19 14:12:27 -03:00