Sha256: 2192b3aff79c9ad03d1661b615f7a6b0c78f73ac2017a1abb2eb3e1e8f0e0c3a

Contents?: true

Size: 878 Bytes

Versions: 2

Compression:

Stored size: 878 Bytes

Contents

# http://sneaq.net/textmate-wtf
$:.reject! { |e| e.include? 'TextMate' }

require 'rubygems'
require 'test/unit'
require 'mocha'
require File.dirname(__FILE__) + '/../lib/provisional'

class Test::Unit::TestCase
  def new_scm(klass, options = {})
    klass.new({ 'name' => 'name', 'template_path' => 'template_path', 'domain' => 'domain', 'id' => 1,
                'username' => 'username', 'password' => 'password' }.merge(options))
  end
  
  def stub_git_checkin(&block)
    repo_stub = stub()
    repo_stub.expects(:add).with('.')
    repo_stub.expects(:commit).with('Initial commit by Provisional')
    if block
      yield repo_stub
    end
    Git.expects(:open).returns(repo_stub)
    Dir.expects(:chdir)
    gitignore_file = stub()
    gitignore_file.expects(:puts).with(@scm.gitignore)
    File.expects(:open).with('.gitignore', 'w').yields(gitignore_file)
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
vigetlabs-provisional-2.1.3 test/test_helper.rb
vigetlabs-provisional-2.1.4 test/test_helper.rb