1) relative to RAILS_ROOT (this is how it worked before) 2) relative to the current execution dir (useful for tests and standalone usage)
…ff helper. This gets rid of one dependency on Acunote.
but if you want to use the library standalone, you need it.
…. Add standard gem/library files.
simply set expected value to empty string as we do for assert_same on strings
Add --nointeractive flag to turn it off. Also turn interactive mode off automatically if the test isn't run from terminal.
- rename --accept-new-values to --autoaccept - rename --refresh to --nocanonicalize - --nocanonicalize no longer accepts new values (unlike --refresh), use --interactive --nocanonicalize --autoaccept - report proper diffs when running with --nocanonicalize - it's possible to run --nocanonicalize without --interactive (just to see if you have some changes in comments) - code cleanups
…argument. Just accept and autofill it automatically.
Interactive tests will autofill expected value for you.
…zed values - regenerated test data
…lly contain only comments
…n the random order. To do that, store offsets not per file, but per file and per original line and then adjust line numbers only when necessary.
…comments (ruby-style, with "#")
…and update test files when requested. Usage: In the test source: assert_same something, <<-END foo bar zee END Runing tests as usual will report a failure (if any) and show a diff. Running tests with --interactive will let you review diffs and accept new actual values as expected (modifying the test files). Running tests with --interactive --accept-new-values will print out diffs and accept all new actual values. Examples: ruby test/unit/foo_test.rb -- --interactive ruby test/unit/foo_test.rb -- --interactive --accept-new-values Note: - assert_same ignores indentation, so you don't have to start your "expected" string from the first position in the line (see example above) - but it skips only the indentation of the first line in the "expected" string, so you still can use indentation like this: assert_same something, <<-END foo 1 foo 1.1 foo 1.2 bar 2 bar 2.1 END - only END and EOS are supported as end of string sequence - it's a requirement that you have <<-END at the same line as assert_same - it's ok to have several assert_same's in the same test method, assert_same correctly updates all assert_same's in the test file - it's ok to leave expected string empty, like this: assert_same something, <<-END END in fact, this is the preferred way to create such tests - you write empty assert_same and then accept the actual value as expected and commit This should replace assert_equal_queries and assert_equal for all cases where we comare strings in our tests.