Skip to content

Commit

Permalink
Missing files
Browse files Browse the repository at this point in the history
  • Loading branch information
Gwyn Morfey committed Apr 18, 2008
1 parent c967a02 commit e4e2de1
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 0 deletions.
12 changes: 12 additions & 0 deletions lib/merb_support/support.rb
@@ -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 changes: 14 additions & 0 deletions test/helper_merb.rb
@@ -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 changes: 11 additions & 0 deletions test/helper_rails.rb
@@ -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 changes: 14 additions & 0 deletions test/mocha_test.rb
@@ -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

0 comments on commit e4e2de1

Please sign in to comment.