aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/test_unit/reporter.rb
Commit message (Collapse)AuthorAgeFilesLines
* Adding frozen_string_literal pragma to Railties.Pat Allan2017-08-141-0/+2
|
* Fix root not being defined on Travis.Kasper Timm Hansen2017-07-161-1/+6
|
* Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"Matthew Draper2017-07-021-1/+0
| | | | | This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
* Enforce frozen string in RubocopKir Shatrov2017-07-011-0/+1
|
* Add option for class_attribute default (#29270)David Heinemeier Hansson2017-05-291-2/+1
| | | | | | | | | | | | * Allow a default value to be declared for class_attribute * Convert to using class_attribute default rather than explicit setter * Removed instance_accessor option by mistake * False is a valid default value * Documentation
* code gardening: removes redundant selfsXavier Noria2016-08-081-1/+1
| | | | | | | | | A few have been left for aesthetic reasons, but have made a pass and removed most of them. Note that if the method `foo` returns an array, `foo << 1` is a regular push, nothing to do with assignments, so no self required.
* applies new string literal convention in railties/libXavier Noria2016-08-061-1/+1
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* use method provided by minitestyuuji.yaginuma2016-02-211-7/+1
| | | | | | | The process of converting `Test` to `String` is already defined in minitest. I think it is better to use that for the consistency of output content. ref: https://github.com/seattlerb/minitest/blob/master/lib/minitest/test.rb#L261..L267
* modify to `error` also abort when specify fail fast optionyuuji.yaginuma2016-02-171-1/+1
|
* test runner, relay minitest information about the error location.Yves Senn2016-02-151-1/+1
| | | | | This is a follow-up to ea70c29 to bring back the assertion error location information provided by minitest.
* Revert "Prefer Minitest's location for test failures."Yves Senn2016-02-151-8/+2
| | | | | | | | | | | | | | | | | | | | This reverts commit 0db310586ac3e15be95d2ef27ff40cfa24c05c10. Closes #23686. Conflicts: railties/test/application/test_runner_test.rb It's possible that the `result.location` returned by minitest is outside the test file itself. For example in the case of mocha. This resulted in bad rerun snipptets: ``` bin/rails test app/models/deliveries/delivery.rb:103 ``` Let's always use the first line of the failed test-case in our rerun snippet. We can display the line number of the assertion error elsewhere.
* Move test coloring closer to where it's used.Kasper Timm Hansen2015-12-231-15/+9
| | | | | | | | | | | Didn't like the constant being at the top of the file, gave it overdue importance. Now that `color_output` expects a result we can shorten some of the flexibility from earlier: * Inline COLOR_CODES constant (keep local variable for readability, but don't need names of colors at run time). * Inline color variable in `color_output`. Looks just as clear without it.
* Remove local variable color.Kasper Timm Hansen2015-12-231-5/+5
| | | | | Focus `color_output`'s intent on coloring output by a result. We aren't meant to pass it arbitrary codes to color output.
* Rename color to color_output.Kasper Timm Hansen2015-12-231-6/+5
| | | | | | The word color is being thrown all around with slightly different meanings. Right now, I understand it. But I'd like to be more immediately clear.
* Remove unused blue color.Kasper Timm Hansen2015-12-231-2/+1
| | | | I got the blues because we aren't coloring any lines blue.
* Color failure line by result code.Kasper Timm Hansen2015-12-231-1/+1
| | | | | | | The static red color wouldn't paint skips in their designated yellow. Use the color name we got from the result label earlier, which marks skips as yellow.
* Add colored output to the new test reporter.Lucas Mazza2015-12-221-1/+39
|
* display detailed information in inline reportingyuuji.yaginuma2015-12-211-1/+7
| | | | | | | | | | | | | | | | | | | | | The errors message only was not displayed, as if it did not use the inline reporting, modified to also information the method name and the like in error are displayed. ``` # before Failed assertion, no message given. bin/rails test test/models/user_test.rb:5 ``` ``` # after Failure: UserTest#test_the_truth: Failed assertion, no message given. bin/rails test test/models/user_test.rb:5 ```
* show relative path the rerun snippet of test runner in rails engineyuuji.yaginuma2015-12-101-1/+5
| | | | | | | | | | | | | Since the absolute path is not required to re-run the test, modified so that unnecessary information is not displayed. ```ruby # before bin/rails test /path/to/blorgh/test/integration/navigation_test.rb:5 # after bin/rails test test/integration/navigation_test.rb:5 ```
* Prefer Minitest's location for test failures.Kasper Timm Hansen2015-11-121-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When running tests, the Rails test runner would report the start of the test method as the test failure. For this test: ```ruby 1 require 'test_helper 2 3 class BunnyTest < ActiveSupport::TestCase 4 test "something failing" do 5 assert false, 'This failed' 6 end 7 end ``` The runner outputs 5 instead of 4: ``` ............................................F This failed bin/rails test test/models/bunny_test.rb:5 ........ ```
* Output inline is set to true in the plugin.Kasper Timm Hansen2015-10-071-1/+1
| | | | | | Change the reporter to just read the option. Pass output_inline where needed in tests.
* Add fail fast to test runner.Kasper Timm Hansen2015-09-291-0/+8
| | | | | Passing `--fail-fast` to the test runner will now abort the test run on the first failure. The run continues on any unexpected errors.
* Add inline failure reporting to test runner.Kasper Timm Hansen2015-09-281-5/+25
| | | | | | | | | Any failures or errors will be reported inline during the run by default. Skipped tests will be reported if run in verbose mode. Any result is output with failure messages and a rerun snippet for that test. Rerun snippets won't be output after a run, unless `--defer-output` is passed.
* do not show "Failed tests" message when a failed test is notyuuji.yaginuma2015-06-231-3/+9
|
* make it possible to customize the executable inside rereun snippets.Yves Senn2015-06-131-1/+5
| | | | | | | | | | | | | | | | | | | In the Rails repository we use a `bin/test` executable to run our tests. However the rerun snippets still included `bin/rails test`: BEFORE: ``` Failed tests: bin/rails test test/cases/adapters/postgresql/schema_test.rb:91 ``` AFTER: ``` Failed tests: bin/test test/cases/adapters/postgresql/schema_test.rb:91 ```
* Improve test runner's Minitest integration.Kasper Timm Hansen2015-06-041-1/+5
| | | | | | | | | | | This also adds free mix and matching of directories, files and lines filters. Like so: bin/rails test models/post_test.rb test/integration models/person_test.rb:26 You can also mix in a traditional Minitest filter: bin/rails test test/integration -n /check_it_out/
* Fix reporter test and verbose modeArthur Neves2015-03-181-1/+1
|
* pluralize rerun snippet heading.Yves Senn2015-03-181-1/+1
|
* Show the right file when test raisesArthur Neves2015-03-181-4/+3
|
* Dont display Failed test if suite passedArthur Neves2015-03-181-0/+1
|
* Add test run by line, and report error by lineArthur Neves2015-03-181-0/+22