Sha256: 4f9f14c1bc86baa9ee013ca3423fa2977dd9b18206159f26d77793769c8a4dfe
Contents?: true
Size: 743 Bytes
Versions: 2
Compression:
Stored size: 743 Bytes
Contents
require "rubygems" require "bundler" Bundler.require(:default, :development) require "minitest/autorun" # For testing Ecology itself, use the local version *first*. $LOAD_PATH.unshift File.join(File.dirname(__FILE__), "..", "lib") require "ecology" class Scope::TestCase def set_up_ecology(file_contents, filename = "some.ecology") match = filename.match(/^(.*)\.erb$/) if match ENV["ECOLOGY_SPEC"] = match[1] File.stubs(:exist?).with(match[1]).returns(false) else ENV["ECOLOGY_SPEC"] = filename end File.stubs(:exist?).with(filename + ".erb").returns(false) File.stubs(:exist?).with(filename).returns(true) File.expects(:read).with(filename).returns(file_contents).at_least_once end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
ecology-0.0.14 | test/test_helper.rb |
ecology-0.0.12 | test/test_helper.rb |