diff options
author | Joshua Peek <josh@joshpeek.com> | 2010-01-04 17:13:45 -0600 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2010-01-04 17:13:45 -0600 |
commit | 947bbc170efc498499911d164eccd05db19a5c63 (patch) | |
tree | 423a052a513bf9434ca4df61ec73e9c19f9adb6a /railties/test/application | |
parent | 508ffccfe7e67315d82fa2947aa7989e6bfbebc9 (diff) | |
download | rails-947bbc170efc498499911d164eccd05db19a5c63.tar.gz rails-947bbc170efc498499911d164eccd05db19a5c63.tar.bz2 rails-947bbc170efc498499911d164eccd05db19a5c63.zip |
Smoke test for test_help
Diffstat (limited to 'railties/test/application')
-rw-r--r-- | railties/test/application/test_test.rb | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/railties/test/application/test_test.rb b/railties/test/application/test_test.rb new file mode 100644 index 0000000000..ff6df93ebc --- /dev/null +++ b/railties/test/application/test_test.rb @@ -0,0 +1,38 @@ +require 'isolation/abstract_unit' + +module ApplicationTests + class TestTest < Test::Unit::TestCase + include ActiveSupport::Testing::Isolation + + def setup + build_app + boot_rails + end + + test "truth" do + app_file 'test/unit/foo_test.rb', <<-RUBY + require 'test_helper' + + class FooTest < ActiveSupport::TestCase + def test_truth + assert true + end + end + RUBY + + run_test 'unit/foo_test.rb' + end + + private + def run_test(name) + result = ruby '-Itest', "#{app_path}/test/#{name}" + assert_equal 0, $?.to_i, result + end + + def ruby(*args) + Dir.chdir(app_path) do + `RUBYLIB='#{$:.join(':')}' #{Gem.ruby} #{args.join(' ')}` + end + end + end +end |