Missing files

This commit is contained in:
Gwyn Morfey 2008-04-18 16:40:24 +01:00
parent c967a02ca0
commit e4e2de1206
4 changed files with 51 additions and 0 deletions

View File

@ -0,0 +1,12 @@
class Hash
def with_indifferent_access
hash = HashWithIndifferentAccess.new(self)
hash.default = self.default
hash
end
end
class NilClass
def to_param
nil
end
end

14
test/helper_merb.rb Normal file
View File

@ -0,0 +1,14 @@
require 'merb-core'
require 'merb_stories'
module Merb
module Test
class RspecStory
include Merb::Test::ControllerHelper
include Merb::Test::RouteHelper
include Merb::Test::ViewHelper
def flunk(message)
raise message
end
end
end
end

11
test/helper_rails.rb Normal file
View File

@ -0,0 +1,11 @@
require "active_support"
silence_warnings do
require "action_controller"
require "action_controller/integration"
end
class ActionController::Integration::Session
def flunk(message)
raise message
end
end

14
test/mocha_test.rb Normal file
View File

@ -0,0 +1,14 @@
require File.dirname(__FILE__) + "/helper"
RAILS_ROOT = "." unless defined?(RAILS_ROOT)
class FooThing
end
class MochaTest < Test::Unit::TestCase
def test_mocha
@foo = FooThing.new
@foo.stubs(:bar).returns("bar")
assert_equal @foo.bar, "bar"
end
end