Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Gwyn Morfey
committed
Apr 18, 2008
1 parent
c967a02
commit e4e2de1
Showing
4 changed files
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |