1
0
Fork 0
mirror of https://github.com/drapergem/draper synced 2023-03-27 23:21:17 -04:00
Commit graph

39 commits

Author SHA1 Message Date
Andrew Haines
4b933ef39d Rename source to object
Closes #501
2013-04-30 14:10:52 +01:00
Andrew Haines
bd67b96799 Avoid minitest-rails deprecation warning 2013-04-04 22:14:12 +01:00
Andrew Haines
9873c33585 Disable failing Decoratable#== spec on Mongoid 3.0 2013-03-03 12:07:41 +00:00
Andrew Haines
2de0592214 Add integration specs for Decoratable.decorate 2013-03-03 11:13:32 +00:00
Andrew Haines
b69fe80498 Add reason for pending spec 2013-03-03 10:34:56 +00:00
Andrew Haines
4c6a182b1d Allow serialization of CollectionDecorators with ActiveModel::Serializers
Closes #471
2013-02-12 18:35:32 +00:00
Andrew Haines
afa97bb401 Add decorates_assigned method to controllers 2013-02-07 01:00:48 +00:00
Andrew Haines
734e376a23 Fix failing specs 2013-01-31 22:49:45 +00:00
Andrew Haines
4a901b7751 Add serializers 2013-01-31 12:51:33 +00:00
Andrew Haines
5c1aa5a0bb Remove stub from Devise helper
Closes #439
2013-01-25 17:42:56 +00:00
Andrew Haines
d1b22caa59 Improve Devise integration 2013-01-25 17:42:56 +00:00
Andrew Haines
50a3435acb Store helper proxies instead of raw view contexts
Closes #436.
2013-01-24 00:23:39 +00:00
Andrew Haines
8b0150317d Basic mongoid integration spec 2013-01-21 13:39:19 +00:00
Andrew Haines
af78f5f0d9 Reduce test noise 2013-01-19 21:55:57 +00:00
Andrew Haines
3d07cb387b Prevent leaking view contexts between tests 2013-01-19 21:55:57 +00:00
Andrew Haines
a039671202 Add support for decoupled specs
Closes #424
2013-01-19 21:55:46 +00:00
Andrew Haines
ef37241c10 Remove dummy app README 2013-01-18 16:32:42 +00:00
Andrew Haines
2bfa25a5ad Revamp specs
* 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
2013-01-17 12:47:25 +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
b2401c71e0 Rails 4 compatibility 2013-01-15 11:23:54 +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
Andrew Haines
97ee7d0554 Remove pending spec on Rails 3.0 2013-01-13 10:54:38 +00:00
Andrew Haines
d528fffe78 Rails 3.0 compatibility 2013-01-12 16:34:55 +00:00
Andrew Haines
eca41450ce Reorganise test integration
Adds compatibility with minitest-rails 0.5
2013-01-12 16:28:37 +00:00
Andrew Haines
b83a95f0f0 Use self == other.source in Decoratable#==
Apparently AR::Base does something tricky with #== which causes
`super(other.source)` to break

Closes #391
2012-12-28 12:52:45 +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
cfbc3888e9 Add mailer specs
Closes #316
2012-11-13 20:32:29 +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
Andrew Haines
b4a5839345 Remove some scaffolding 2012-11-10 16:50:09 +00:00
Andrew Haines
dcf9477c94 Ignore dummy databases 2012-11-10 16:27:55 +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
f197ced4ca ignoring test db 2012-10-24 07:05:35 -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
d40af21dba Added dummy databases to .gitignore. 2012-10-19 14:12:27 -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
Steve Klabnik
90a4859085 Adding cucumber stuff for integration testing.
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. ❤️
2012-10-19 14:12:27 -03:00