class TestRunnerInEngineTest
Public Instance Methods
setup()
click to toggle source
# File railties/test/generators/test_runner_in_engine_test.rb, line 8 def setup @destination_root = Dir.mktmpdir("bukkits") Dir.chdir(@destination_root) { `bundle exec quails plugin new bukkits --full --skip-bundle` } plugin_file "test/dummy/db/schema.rb", "" end
teardown()
click to toggle source
# File railties/test/generators/test_runner_in_engine_test.rb, line 14 def teardown FileUtils.rm_rf(@destination_root) end
test_rerun_snippet_is_relative_path()
click to toggle source
# File railties/test/generators/test_runner_in_engine_test.rb, line 18 def test_rerun_snippet_is_relative_path create_test_file "post", pass: false output = run_test_command("test/post_test.rb") expect = %r{Running:\n\nPostTest\nF\n\nFailure:\nPostTest#test_truth \[[^\]]+test/post_test\.rb:6\]:\nwups!\n\nbin/quails test test/post_test\.rb:4} assert_match expect, output end
Private Instance Methods
plugin_path()
click to toggle source
# File railties/test/generators/test_runner_in_engine_test.rb, line 27 def plugin_path "#{@destination_root}/bukkits" end
run_test_command(arguments)
click to toggle source
# File railties/test/generators/test_runner_in_engine_test.rb, line 31 def run_test_command(arguments) Dir.chdir(plugin_path) { `bin/quails test #{arguments}` } end