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

25 commits

Author SHA1 Message Date
Frank Macreery
427d993631 Decorators generated via controller generator hooks have singular names 2014-06-02 19:05:08 -04:00
Azul
cd4f298987 hook in generator from controller generator
* use hook instead of invoke so it's easy to configure
* hook into controller_generator and scaffold_controller_generator
  This feels more natural than invoking from the resource generator.

Decorators are closely related to controllers, views and helpers.
So they should be generated in that context.
If controller generation is disabled for say generating resources there
is no point in creating decorators.
2013-06-07 21:42:50 +02:00
Andrew Haines
9ad833b475 Fix build failure
rspec-rails 2.13.1 checks Rails.version when loading RailsExampleGroup
which is used by ammeter. Therefore we need to require rails.
2013-04-29 15:08:47 +01:00
Andrew Haines
cbe62c03e4 Uncomment accidentally-commented line 😊 2013-02-12 08:44:14 +00:00
Andrew Haines
e0df75d719 Fix ApplicationDecorator usage in generator
Closes #456
2013-02-05 11:24:40 +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
1fac02b65b Add MiniTest generators 2013-01-14 11:57:06 +00:00
Andrew Haines
eca41450ce Reorganise test integration
Adds compatibility with minitest-rails 0.5
2013-01-12 16:28:37 +00:00
Pete Bevin
465f16330a Fix spelling mistake in spec 2012-12-01 12:49:18 -05:00
Steve Klabnik
ae852341c1 Don't generate #decorates.
We don't want to use that anymore.
2012-11-29 17:22:39 -08:00
Andrew Haines
025742cb3b Rename Base to Decorator 2012-10-09 10:05:22 +01:00
Vasiliy Ermolovich
6f0d5aae9f handle namespaced models in spec generators
closes #279
2012-09-21 19:02:06 +03:00
Vasiliy Ermolovich
f42ec0a287 make specs order independed 2012-06-09 02:14:48 +03:00
Vasiliy Ermolovich
b302e8dd42 use ApplicationDecorator if it's present, closes #190 2012-05-12 02:18:57 +03:00
Steve Klabnik
9155e58f74 Generators redux.
Lots of changes here:

* rake draper:install no longer needed
* don't generate an ApplicationGenerator by default
** If one exists, the generator respects it
* Fixes #53
2012-05-09 14:17:41 -04:00
Vasiliy Ermolovich
49f01d9086 rework generators 2012-04-28 23:02:22 +03:00
Steve Ellis
b2485bcfb7 fix generator naming for CamelCased models 2012-03-31 11:36:59 -04:00
Vasiliy Ermolovich
44f1d95c42 always generate file with downcased name 2012-03-27 17:33:19 +03:00
Mark Burns
93191523ba trailing whitespace 2012-03-03 14:01:19 +00:00
Thiago Almeida
7e45a1f772 draper:decorator defaults to rspec too 2012-02-14 00:19:03 -02:00
Steve Klabnik
56ce55addb Zomg removing trailing whitespace. 2012-02-13 10:24:31 -05:00
Alexandre Angelim
7d6789444b Splitting draper:decorator into draper:install and draper:decorator, so I won't lose all my decorators when trying to destroy one of them (again!).
- run rails g draper:install to create draper directories (app/decorators and spec/decorators), along with application_decorator files.
- use rails g draper:install -t=test_unit to select unit tests instead of rspec.
2011-11-30 14:07:15 -02:00
Benny Wong
ca3cf912e0 Add a Test::Unit generator and hook to create default decorator tests 2011-10-19 23:17:01 -04:00
Benny Wong
fa4f2ebbd5 Add a RSpec generator and hook to create default decorator specs 2011-10-17 02:45:22 -04:00
Alex Rothenberg
16e8868da1 added generator specs using the ammeter gem 2011-10-06 16:58:04 -04:00