Skip to content

Commit

Permalink
documented problem with test files
Browse files Browse the repository at this point in the history
  • Loading branch information
raganwald committed Nov 25, 2009
1 parent 239d29f commit 1f43838
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion doc/issues.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,8 @@ At this time I haven't figured out how to make rewriting work in erb or haml tem

**file paths**

Because `rewrite_rails` makes copies of your `.rr` files and puts them in a new place, this will wreak havoc with relative paths in your code. Most specifically, when you manually `require` another file, you can have unexpected errors, especially if you use relative paths. For example, `test_helper.rb` might be in the same directory as `foobar_test.rb`, but if you write `widget_test.rr`, you will discover that the `widget_test.rb` file created by `rewrite_rails` is off in an entirely different directory and a relative link will break.
Because `rewrite_rails` makes copies of your `.rr` files and puts them in a new place, this will wreak havoc with relative paths in your code. Most specifically, when you manually `require` another file, you can have unexpected errors, especially if you use relative paths. For example, `test_helper.rb` might be in the same directory as `foobar_test.rb`, but if you write `widget_test.rr`, you will discover that the `widget_test.rb` file created by `rewrite_rails` is off in an entirely different directory and a relative link will break.

**rake test**

Test files are funny. They don't use Rails' automagical loading, so `rewrite_rails` doesn't intercept them. Therefore... You cannot use rewriters on test cases at this time.

0 comments on commit 1f43838

Please sign in to comment.