Sha256: 745de1bdf850eaf118eea47ec5d3dc31d8d3ae2a9e7c82bbce88a457efd59c7b

Contents?: true

Size: 897 Bytes

Versions: 1

Compression:

Stored size: 897 Bytes

Contents

#### Rubigen helpers
require 'rubigen'
require 'rubigen/helpers/generator_test_helper'
require 'taza'


def generator_sources
  [RubiGen::PathSource.new(:test, File.join(File.dirname(__FILE__), "..", "app_generators")),
  RubiGen::PathSource.new(:test, File.join(File.dirname(__FILE__), "..", "watircraft_generators"))]
end

module Helpers
  module Generator
    def generate_project options=[]
      generator_args = [APP_ROOT] + options
      run_generator('watircraft', generator_args, generator_sources)
      ::Taza::Settings.stubs(:path).returns(APP_ROOT)       
    end
  end
  
  module Taza
    def stub_settings
      ::Taza::Settings.stubs(:config).returns({})
    end

    def stub_browser
      stub_browser = stub()
      stub_browser.stubs(:goto)
      stub_browser.stubs(:close)
      ::Taza::Browser.stubs(:create).returns(stub_browser)
    end
  end
end
#### Rubigen helpers end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
bret-watircraft-0.5.0 spec/spec_generator_helper.rb