Skip to content

Commit

Permalink
Require the appropriate mocking library
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Gunderloy authored and Mike Gunderloy committed Sep 17, 2009
1 parent 99f3d27 commit f297003
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lark_template.rb
Expand Up @@ -538,9 +538,13 @@ def generate_expectation(object_name, method_name, parameter = nil)

# testing
file 'test/exemplars/sample_exemplar.rb', load_pattern('test/exemplars/sample_exemplar.rb')
mock_require = ""
mock_include = ""
if @mocking == "rr"
mock_require = "require 'rr'"
mock_include = " include RR::Adapters::TestUnit"
elsif @mocking == "mocha"
mock_require = "require 'mocha'"
end
file 'test/test_helper.rb', load_pattern('test/test_helper.rb', 'default', binding)

Expand Down
1 change: 1 addition & 0 deletions patterns/default/test/test_helper.rb
Expand Up @@ -8,6 +8,7 @@
require File.expand_path(File.dirname(__FILE__) + "/../config/environment")
require 'test_help'
require 'shoulda'
#{mock_require}
require 'authlogic/test_case'
require 'webrat'

Expand Down

0 comments on commit f297003

Please sign in to comment.