Missing files
This commit is contained in:
parent
c967a02ca0
commit
e4e2de1206
12
lib/merb_support/support.rb
Normal file
12
lib/merb_support/support.rb
Normal 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
14
test/helper_merb.rb
Normal 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
11
test/helper_rails.rb
Normal 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
14
test/mocha_test.rb
Normal 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
|
Loading…
Reference in New Issue
Block a user