From ab63f1449dfeb8d284588482320660c176e06f50 Mon Sep 17 00:00:00 2001 From: Alexey Verkhovsky Date: Sun, 16 Jan 2005 22:40:44 +0000 Subject: [PATCH] Added shebangs and require 'test_helper' to all tests, so that they can be run standalone --- test/unit/chunks/category_test.rb | 4 +++- test/unit/chunks/nowiki_test.rb | 4 +++- test/unit/chunks/wiki_test.rb | 4 +++- test/unit/diff_test.rb | 4 +++- test/unit/page_test.rb | 8 +++++--- test/unit/redcloth_for_tex_test.rb | 6 ++++-- test/unit/revision_test.rb | 8 +++++--- test/unit/uri_test.rb | 4 +++- test/unit/url_rewriting_hack_test.rb | 2 ++ test/unit/web_test.rb | 4 ++-- test/unit/wiki_service_test.rb | 4 +++- test/unit/wiki_words_test.rb | 6 ++++-- 12 files changed, 40 insertions(+), 18 deletions(-) diff --git a/test/unit/chunks/category_test.rb b/test/unit/chunks/category_test.rb index 7112eae2..cdf29f23 100755 --- a/test/unit/chunks/category_test.rb +++ b/test/unit/chunks/category_test.rb @@ -1,6 +1,8 @@ +#!/bin/env ruby + +require File.dirname(__FILE__) + '/../../test_helper' require 'chunks/category' require 'chunks/match' -require 'test/unit' class CategoryTest < Test::Unit::TestCase include ChunkMatch diff --git a/test/unit/chunks/nowiki_test.rb b/test/unit/chunks/nowiki_test.rb index b43e0705..c2a78a55 100755 --- a/test/unit/chunks/nowiki_test.rb +++ b/test/unit/chunks/nowiki_test.rb @@ -1,6 +1,8 @@ +#!/bin/env ruby + +require File.dirname(__FILE__) + '/../../test_helper' require 'chunks/nowiki' require 'chunks/match' -require 'test/unit' class NoWikiTest < Test::Unit::TestCase include ChunkMatch diff --git a/test/unit/chunks/wiki_test.rb b/test/unit/chunks/wiki_test.rb index aeb1ef22..55609f46 100755 --- a/test/unit/chunks/wiki_test.rb +++ b/test/unit/chunks/wiki_test.rb @@ -1,6 +1,8 @@ +#!/bin/env ruby + +require File.dirname(__FILE__) + '/../../test_helper' require 'chunks/wiki' require 'chunks/match' -require 'test/unit' class WikiTest < Test::Unit::TestCase include ChunkMatch diff --git a/test/unit/diff_test.rb b/test/unit/diff_test.rb index 24b52244..c79e387b 100755 --- a/test/unit/diff_test.rb +++ b/test/unit/diff_test.rb @@ -1,4 +1,6 @@ -require 'test/unit' +#!/bin/env ruby + +require File.dirname(__FILE__) + '/../test_helper' require 'diff' include Diff diff --git a/test/unit/page_test.rb b/test/unit/page_test.rb index 7c6540ee..2d29d174 100755 --- a/test/unit/page_test.rb +++ b/test/unit/page_test.rb @@ -1,6 +1,8 @@ -require "test/unit" -require "web" -require "page" +#!/bin/env ruby + +require File.dirname(__FILE__) + '/../test_helper' +require 'web' +require 'page' class MockWeb < Web def initialize() super('test','test') end diff --git a/test/unit/redcloth_for_tex_test.rb b/test/unit/redcloth_for_tex_test.rb index 72d9e91e..e5a69eb1 100755 --- a/test/unit/redcloth_for_tex_test.rb +++ b/test/unit/redcloth_for_tex_test.rb @@ -1,5 +1,7 @@ -require "test/unit" -require "redcloth_for_tex" +#!/bin/env ruby + +require File.dirname(__FILE__) + '/../test_helper' +require 'redcloth_for_tex' class RedClothForTexTest < Test::Unit::TestCase def test_basics diff --git a/test/unit/revision_test.rb b/test/unit/revision_test.rb index fb21b471..7a29ed36 100755 --- a/test/unit/revision_test.rb +++ b/test/unit/revision_test.rb @@ -1,6 +1,8 @@ -require "web" -require "test/unit" -require "revision" +#!/bin/env ruby + +require File.dirname(__FILE__) + '/../test_helper' +require 'web' +require 'revision' class WebStub < Web; attr_accessor :markup diff --git a/test/unit/uri_test.rb b/test/unit/uri_test.rb index 0b427840..722a479f 100755 --- a/test/unit/uri_test.rb +++ b/test/unit/uri_test.rb @@ -1,6 +1,8 @@ +#!/bin/env ruby + +require File.dirname(__FILE__) + '/../test_helper' require 'chunks/uri' require 'chunks/match' -require 'test/unit' class URITest < Test::Unit::TestCase include ChunkMatch diff --git a/test/unit/url_rewriting_hack_test.rb b/test/unit/url_rewriting_hack_test.rb index b54ced23..d29d34d9 100755 --- a/test/unit/url_rewriting_hack_test.rb +++ b/test/unit/url_rewriting_hack_test.rb @@ -1,3 +1,5 @@ +#!/bin/env ruby + require File.dirname(__FILE__) + '/../test_helper' require 'url_rewriting_hack' diff --git a/test/unit/web_test.rb b/test/unit/web_test.rb index e85b0076..9de65c32 100755 --- a/test/unit/web_test.rb +++ b/test/unit/web_test.rb @@ -1,6 +1,6 @@ -#!/usr/bin/ruby +#!/bin/env ruby -require 'test/unit' +require File.dirname(__FILE__) + '/../test_helper' require 'wiki_service' class WebTest < Test::Unit::TestCase diff --git a/test/unit/wiki_service_test.rb b/test/unit/wiki_service_test.rb index 43bea85b..544ce870 100755 --- a/test/unit/wiki_service_test.rb +++ b/test/unit/wiki_service_test.rb @@ -1,4 +1,6 @@ -require 'test/unit' +#!/bin/env ruby + +require File.dirname(__FILE__) + '/../test_helper' require 'wiki_service' class WikiServiceTest < Test::Unit::TestCase diff --git a/test/unit/wiki_words_test.rb b/test/unit/wiki_words_test.rb index e3755128..2b2433d5 100755 --- a/test/unit/wiki_words_test.rb +++ b/test/unit/wiki_words_test.rb @@ -1,5 +1,7 @@ -require "test/unit" -require "wiki_words" +#!/bin/env ruby + +require File.dirname(__FILE__) + '/../test_helper' +require 'wiki_words' class WikiWordsTest < Test::Unit::TestCase