Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rake generator:cleanup doesn't undo rake generator:clearance_views; problems with rake test dependencies #77

Closed
rnewman57 opened this issue Feb 25, 2010 · 3 comments

Comments

@rnewman57
Copy link

The rake generator:cleanup task (which is invoked by rake test:basic) does not remove the Formtastic views that rake generator:clearance_views adds to test/rails_root/app/views .

As a result, you can do this after cloning the Clearance repository:

- edit an error into app/views/sessions/new.html.erb (say, by changing "form_for" to "fform_for")
- rake test:basic and watch 9 of the tests fail
- rake test:features and watch 9 of the cucumber steps fail
- rake test:views and watch all the tests pass
- rake test:basic again ... and watch all the tests pass!
- rake test:features again ... and watch all the steps pass!

The problem here is that rake test:views has polluted the test/rails_root/app/views/{passwords,sessions,users} directories with generated .erb files . Then neither rake test:basic nor rake test:features removes these files before running their tests.

I think several things need to be done here:

  • rake generator:cleanup needs to remove the generated formtastic views
  • each of the four test tasks should depend on the generator:cleanup and generator:clearance tasks
  • rake test:basic should not depend on on generator:clearance_features
  • rake test:features should depend on generator:clearance_features
  • rake test:features_for_views should depend on both generator:clearance_features and generator:clearance_views
@rnewman57
Copy link
Author

@rnewman57
Copy link
Author

A new commit that incorporates this fix:

http://github.com/rnewman57/clearance/commit/a4d19ec27479887f978a429130fd10bc74a52268

@croaky
Copy link
Contributor

croaky commented Apr 9, 2010

Added this in:

http://github.com/thoughtbot/clearance/commit/3c22c5a5b345c5b2baae3c199eba16ef6ca3f335

Didn't take your change because there was other stuff in it and I suck at git. Gave you credit in the commit message and CHANGELOG. Thanks.

hgmnz pushed a commit to hgmnz/clearance that referenced this issue Jun 28, 2011
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants