Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Tag: v0.1
Commits on Aug 20, 2011
  1. @adymo
Commits on Aug 17, 2011
  1. @adymo

    Allow two ways to specify the reference log file path:

    adymo authored
    1) relative to RAILS_ROOT (this is how it worked before)
    2) relative to the current execution dir (useful for tests and standalone usage)
  2. @adymo

    Fix typo in docs

    adymo authored
  3. @adymo
  4. @adymo
  5. @adymo

    Add a copy of array_diff library and our derivative from that text_di…

    adymo authored
    …ff helper.
    This gets rid of one dependency on Acunote.
  6. @adymo

    Ignore kate editor backup files

    adymo authored
  7. @adymo

    Add assert_same/lib dir to $LOAD_PATH. Rails and gem do that for us,

    adymo authored
    but if you want to use the library standalone, you need it.
  8. @adymo

    Simple tests for assert_same

    adymo authored
  9. @adymo

    Ruby library/gem layout for assert_same repository. License it as MIT…

    adymo authored
    …. Add standard gem/library files.
  10. @adymo

    Do not break in assert_same on files when file doesn't exist,

    adymo authored
    simply set expected value to empty string as we do for assert_same on strings
  11. @adymo

    Use GNU style for cmdline options naming: dash after "no":

    adymo authored
  12. @adymo
  13. @adymo
  14. @adymo
  15. @adymo

    Enable interactive mode for assert_same by default.

    adymo authored
    Add --nointeractive flag to turn it off.
    Also turn interactive mode off automatically if the test isn't run from terminal.
  16. @adymo

    Various assert_same improvemtents and cleanups

    adymo authored
    - 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
  17. @adymo

    Do not ask to accept new actual value for assert_same without second …

    adymo authored
    Just accept and autofill it automatically.
  18. @adymo

    Make it possible to write assert_same's without second argument.

    adymo authored
    Interactive tests will autofill expected value for you.
  19. @adymo

    - fixed assert_same to correctly compare canonicalized/not-canonicali…

    adymo authored
    …zed values
    - regenerated test data
  20. @adymo
  21. @adymo

    Make it possible to do assert_same on a file:

    adymo authored
      assert_same something, :log => 'filename'
    "filename" is a path to file relative to RAILS_DIR
    Use this in one place where we need such file-based assert_same.
  22. @adymo

    When canonicalizing query tests output, ignore empty lines: they usua…

    adymo authored
    …lly contain
    only comments
  23. @adymo
  24. @adymo
  25. @adymo

    Add --refresh argument to assert_same tests:

    adymo authored
    - it will compare text with comments (non-canonicalized form)
    - it will automatically accept new changes including new comments
  26. @adymo
  27. @adymo

    Correctly do inserts into test files when test methods are executed i…

    adymo authored
    …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.
  28. @adymo

    Improve assert_same to ignore trailing spaces in lines and same-line …

    adymo authored
    …comments (ruby-style, with "#")
  29. @adymo
  30. @adymo
  31. @adymo

    New assertion type: assert_same to compare two strings, output diff …

    adymo authored
    …and update test files when requested.
        In the test source:
            assert_same something, <<-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.
            ruby test/unit/foo_test.rb -- --interactive
            ruby test/unit/foo_test.rb -- --interactive --accept-new-values
        - 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
        - only END and EOS are supported as end of string sequence
        - it's a requirement that you have <<-END at the same line as
        - it's ok to have several assert_same's in the same test method,
          correctly updates all assert_same's in the test file
        - it's ok to leave expected string empty, like this:
          assert_same something, <<-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.
Something went wrong with that request. Please try again.