Skip to content

Commit

Permalink
* Updated the docs regarding testing.
Browse files Browse the repository at this point in the history
  • Loading branch information
sbecker committed Jul 2, 2007
1 parent 70e31c8 commit 01d7bd3
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions README
Expand Up @@ -152,21 +152,21 @@ All options for stylesheet_link_tag still work, so if you want to specify a diff

So you want to run the tests eh? Ok, then listen:

This plugin has a full suite of tests. But you've gotta follow a certain procedure. If you do, all tests should pass:
This plugin has a full suite of tests. But you've gotta follow a
certain procedure. If you do, all tests should pass. You cant run
them all at once (unfortunately) by running "rake" because the
tests depend on ENV['RAILS_ENV'] being different, and as far as I
know, this can't be changed in a running script once it is set. So,
we run them separately. Observe:

> rails newtestapp
> cd newtestapp
> ./script/plugin install http://sbecker.net/shared/plugins/asset_packager
> cd vendor/plugins/asset_packager/test/
> ruby asset_packager_test.rb # run this twice, will give 1 error the first time, not an actual error. I'll fix this up sometime.
> ruby asset_packager_test.rb # the second time, all pass
> ruby asset_packager_test.rb # all pass
> ruby asset_package_helper_development_test.rb # all pass
> ruby asset_package_helper_production_test.rb # all pass

The first test class, "asset_packager_test.rb" builds all the packages that the next two test classes depend on.

The last two helper test classes have to be run seperately because they have different RAILS_ENV constant values, which, to my knowledge, can only be set once.

== License
Copyright (c) 2006 Scott Becker - http://synthesis.sbecker.net
Contact Email: becker.scott@gmail.com
Expand Down

0 comments on commit 01d7bd3

Please sign in to comment.