Sha256: 92c2762a68f1bcb6e411d6c0a4d0e328977555bc244f2c57b265943faf6c2dd5

Contents?: true

Size: 1.01 KB

Versions: 1

Compression:

Stored size: 1.01 KB

Contents

ENV.delete 'HTTP_PROXY' if ENV['HTTP_PROXY']
require 'rubygems' #for ruby187
require 'erb'
require 'psych'

begin
	require 'lazyman'
rescue LoadError
	puts 'you need using "gem install lazyman" to install lazyman first'
end

<% require 'active_support/all' %>
Lazyman::Initializer.new(File.expand_path(File.join('.')), '<%= app_name %>')
$:.unshift(File.expand_path File.join('.'))

RSpec.configure do |c|
	c.treat_symbols_as_metadata_keys_with_true_values = true

	unless($config.tags.empty?)
		tags = $config.tags.lazy_to_hash
	end 

	c.filter_run tags

	def test_data file
		content = ''
		file_path = File.expand_path(File.join('.', 'app', 'test_data', "#{file}.yml"))
		raise "Can not find #{file}.yml" unless File.exists?(file_path)
		File.open(file_path, 'r') do |handle|
			content = handle.read
		end
		Psych.load ERB.new(content).result(binding)
	end
	
	c.before(:suite) do
		$navi = <%= app_name.camelize %>Navigator.new $config
	end

	c.after(:suite) do
		$navi.close
	end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
lazyman-0.1.5 lib/lazyman/generators/lazyman/app/cases/spec_helper.rb.tt