mirror of
https://github.com/sinatra/sinatra
synced 2023-03-27 23:18:01 -04:00
adjust require lines for test helper, so it also works properly on 1.9.2
This commit is contained in:
parent
5a899b2df3
commit
e001d62669
34 changed files with 34 additions and 34 deletions
|
@ -1,4 +1,4 @@
|
||||||
require File.dirname(__FILE__) + '/helper'
|
require File.expand_path('../helper', __FILE__)
|
||||||
|
|
||||||
class BaseTest < Test::Unit::TestCase
|
class BaseTest < Test::Unit::TestCase
|
||||||
def test_default
|
def test_default
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
require File.dirname(__FILE__) + '/helper'
|
require File.expand_path('../helper', __FILE__)
|
||||||
|
|
||||||
begin
|
begin
|
||||||
require 'builder'
|
require 'builder'
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
require File.dirname(__FILE__) + '/helper'
|
require File.expand_path('../helper', __FILE__)
|
||||||
|
|
||||||
begin
|
begin
|
||||||
require 'coffee-script'
|
require 'coffee-script'
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
require File.dirname(__FILE__) + '/helper'
|
require File.expand_path('../helper', __FILE__)
|
||||||
|
|
||||||
begin
|
begin
|
||||||
require 'creole'
|
require 'creole'
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# encoding: UTF-8
|
# encoding: UTF-8
|
||||||
require File.dirname(__FILE__) + '/helper'
|
require File.expand_path('../helper', __FILE__)
|
||||||
require 'erb'
|
require 'erb'
|
||||||
|
|
||||||
class BaseTest < Test::Unit::TestCase
|
class BaseTest < Test::Unit::TestCase
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
require File.dirname(__FILE__) + '/helper'
|
require File.expand_path('../helper', __FILE__)
|
||||||
|
|
||||||
class ERBTest < Test::Unit::TestCase
|
class ERBTest < Test::Unit::TestCase
|
||||||
def engine
|
def engine
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
require File.dirname(__FILE__) + '/helper'
|
require File.expand_path('../helper', __FILE__)
|
||||||
|
|
||||||
class ExtensionsTest < Test::Unit::TestCase
|
class ExtensionsTest < Test::Unit::TestCase
|
||||||
module FooExtensions
|
module FooExtensions
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
require File.dirname(__FILE__) + '/helper'
|
require File.expand_path('../helper', __FILE__)
|
||||||
|
|
||||||
class BeforeFilterTest < Test::Unit::TestCase
|
class BeforeFilterTest < Test::Unit::TestCase
|
||||||
it "executes filters in the order defined" do
|
it "executes filters in the order defined" do
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
require File.dirname(__FILE__) + '/helper'
|
require File.expand_path('../helper', __FILE__)
|
||||||
|
|
||||||
begin
|
begin
|
||||||
require 'haml'
|
require 'haml'
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
require File.dirname(__FILE__) + '/helper'
|
require File.expand_path('../helper', __FILE__)
|
||||||
require 'date'
|
require 'date'
|
||||||
|
|
||||||
class HelpersTest < Test::Unit::TestCase
|
class HelpersTest < Test::Unit::TestCase
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
require File.dirname(__FILE__) + '/helper'
|
require File.expand_path('../helper', __FILE__)
|
||||||
|
|
||||||
begin
|
begin
|
||||||
require 'less'
|
require 'less'
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
require File.dirname(__FILE__) + '/helper'
|
require File.expand_path('../helper', __FILE__)
|
||||||
|
|
||||||
begin
|
begin
|
||||||
require 'liquid'
|
require 'liquid'
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
require File.dirname(__FILE__) + '/helper'
|
require File.expand_path('../helper', __FILE__)
|
||||||
|
|
||||||
class FooError < RuntimeError
|
class FooError < RuntimeError
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
require File.dirname(__FILE__) + '/helper'
|
require File.expand_path('../helper', __FILE__)
|
||||||
|
|
||||||
begin
|
begin
|
||||||
require 'markaby'
|
require 'markaby'
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
require File.dirname(__FILE__) + '/helper'
|
require File.expand_path('../helper', __FILE__)
|
||||||
|
|
||||||
MarkdownTest = proc do
|
MarkdownTest = proc do
|
||||||
def markdown_app(&block)
|
def markdown_app(&block)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
require File.dirname(__FILE__) + '/helper'
|
require File.expand_path('../helper', __FILE__)
|
||||||
|
|
||||||
class MiddlewareTest < Test::Unit::TestCase
|
class MiddlewareTest < Test::Unit::TestCase
|
||||||
setup do
|
setup do
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
require File.dirname(__FILE__) + '/helper'
|
require File.expand_path('../helper', __FILE__)
|
||||||
|
|
||||||
begin
|
begin
|
||||||
require 'nokogiri'
|
require 'nokogiri'
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
require File.dirname(__FILE__) + '/helper'
|
require File.expand_path('../helper', __FILE__)
|
||||||
|
|
||||||
begin
|
begin
|
||||||
require 'radius'
|
require 'radius'
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
require File.dirname(__FILE__) + '/helper'
|
require File.expand_path('../helper', __FILE__)
|
||||||
|
|
||||||
begin
|
begin
|
||||||
require 'rdoc/markup/to_html'
|
require 'rdoc/markup/to_html'
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Tests to check if all the README examples work.
|
# Tests to check if all the README examples work.
|
||||||
require File.dirname(__FILE__) + '/helper'
|
require File.expand_path('../helper', __FILE__)
|
||||||
|
|
||||||
class ReadmeTest < Test::Unit::TestCase
|
class ReadmeTest < Test::Unit::TestCase
|
||||||
example do
|
example do
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
require File.dirname(__FILE__) + '/helper'
|
require File.expand_path('../helper', __FILE__)
|
||||||
require 'stringio'
|
require 'stringio'
|
||||||
|
|
||||||
class RequestTest < Test::Unit::TestCase
|
class RequestTest < Test::Unit::TestCase
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# encoding: utf-8
|
# encoding: utf-8
|
||||||
|
|
||||||
require File.dirname(__FILE__) + '/helper'
|
require File.expand_path('../helper', __FILE__)
|
||||||
|
|
||||||
class ResponseTest < Test::Unit::TestCase
|
class ResponseTest < Test::Unit::TestCase
|
||||||
setup do
|
setup do
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
require File.dirname(__FILE__) + '/helper'
|
require File.expand_path('../helper', __FILE__)
|
||||||
|
|
||||||
class ResultTest < Test::Unit::TestCase
|
class ResultTest < Test::Unit::TestCase
|
||||||
it "sets response.body when result is a String" do
|
it "sets response.body when result is a String" do
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
require File.dirname(__FILE__) + '/helper'
|
require File.expand_path('../helper', __FILE__)
|
||||||
|
|
||||||
module RouteAddedTest
|
module RouteAddedTest
|
||||||
@routes, @procs = [], []
|
@routes, @procs = [], []
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# I like coding: UTF-8
|
# I like coding: UTF-8
|
||||||
require File.dirname(__FILE__) + '/helper'
|
require File.expand_path('../helper', __FILE__)
|
||||||
|
|
||||||
# Helper method for easy route pattern matching testing
|
# Helper method for easy route pattern matching testing
|
||||||
def route_def(pattern)
|
def route_def(pattern)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
require File.dirname(__FILE__) + '/helper'
|
require File.expand_path('../helper', __FILE__)
|
||||||
|
|
||||||
begin
|
begin
|
||||||
require 'sass'
|
require 'sass'
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
require File.dirname(__FILE__) + '/helper'
|
require File.expand_path('../helper', __FILE__)
|
||||||
|
|
||||||
begin
|
begin
|
||||||
require 'sass'
|
require 'sass'
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
require File.dirname(__FILE__) + '/helper'
|
require File.expand_path('../helper', __FILE__)
|
||||||
|
|
||||||
module Rack::Handler
|
module Rack::Handler
|
||||||
class Mock
|
class Mock
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
require File.dirname(__FILE__) + '/helper'
|
require File.expand_path('../helper', __FILE__)
|
||||||
|
|
||||||
class SettingsTest < Test::Unit::TestCase
|
class SettingsTest < Test::Unit::TestCase
|
||||||
setup do
|
setup do
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
require File.dirname(__FILE__) + '/helper'
|
require File.expand_path('../helper', __FILE__)
|
||||||
|
|
||||||
class SinatraTest < Test::Unit::TestCase
|
class SinatraTest < Test::Unit::TestCase
|
||||||
it 'creates a new Sinatra::Base subclass on new' do
|
it 'creates a new Sinatra::Base subclass on new' do
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
require File.dirname(__FILE__) + '/helper'
|
require File.expand_path('../helper', __FILE__)
|
||||||
|
|
||||||
begin
|
begin
|
||||||
require 'slim'
|
require 'slim'
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
require File.dirname(__FILE__) + '/helper'
|
require File.expand_path('../helper', __FILE__)
|
||||||
|
|
||||||
class StaticTest < Test::Unit::TestCase
|
class StaticTest < Test::Unit::TestCase
|
||||||
setup do
|
setup do
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# encoding: UTF-8
|
# encoding: UTF-8
|
||||||
require File.dirname(__FILE__) + '/helper'
|
require File.expand_path('../helper', __FILE__)
|
||||||
File.delete(File.dirname(__FILE__) + '/views/layout.test') rescue nil
|
File.delete(File.dirname(__FILE__) + '/views/layout.test') rescue nil
|
||||||
|
|
||||||
class TestTemplate < Tilt::Template
|
class TestTemplate < Tilt::Template
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
require File.dirname(__FILE__) + '/helper'
|
require File.expand_path('../helper', __FILE__)
|
||||||
|
|
||||||
begin
|
begin
|
||||||
require 'redcloth'
|
require 'redcloth'
|
||||||
|
|
Loading…
Reference in a new issue