Really fixing them would be nicer but that can be complicated, so just run them 3 times and if they fail every time fail, otherwise pass with warnings.
Code
Really fixing them would be nicer but that can be complicated, so just run them 3 times and if they fail every time fail, otherwise pass with warnings.
Code
The official solution for this problem is to use e.g. CGI.escape thing.to_str,
my unofficial solution is to automate that ๐
Code
Very useful helper if you want to keep your environment clean, useful for testing or if you have to require something that has lots of side effects or memory leaks.
Usage
result = fork_and_return do require 'some_lib_with_side_effects' leak_some_memory get_stuff_done end puts result
Code
# https://grosser.it/2012/07/15/return-values-from-fork-fork_and_return/ def fork_and_return(&block) require 'parallel' Parallel.map([0], &block).first end
If you like test::unit or are simply stuck with it, this works great on ruby 1.8 and 1.9+, have fun ๐
gem install testrbl testrbl test/unit/xxx.rb:15 # test or should or context on line 15 testrbl test/unit.xxx.rb # all tests in xxx.rb testrbl test/unit # all tests in folder
Just posting it here since I did not find anything on google when searching this for our rails 2 upgrade ๐
view_context.instance_variable_get(:@_virtual_path)