Sha256: b13afea0640fdb7d5e60fef1592b9fedb8f4a4716912904c931604cd9afe42f1
Contents?: true
Size: 1.01 KB
Versions: 38
Compression:
Stored size: 1.01 KB
Contents
# encoding: utf-8 require 'aruba/api' require 'aruba/reporting' module FeduxOrgStdlib # Spec Helpers module SpecHelper # Helpers for aruba module Aruba include ::Aruba::Api def dirs @dirs ||= %w(tmp rspec) end def absolute_path(*args) in_current_dir { File.expand_path File.join(*args) } end def _create_file(*args) super args.first end def create_dir(*args) super args.first end def touch_file(file_name) in_current_dir do file_name = File.expand_path(file_name) _mkdir(File.dirname(file_name)) FileUtils.touch file_name end file_name end end end end RSpec.configure do |c| c.include FeduxOrgStdlib::SpecHelper::Aruba c.before :each do clean_current_dir end c.around(:example) do |example| old_env = ENV.to_h with_env 'HOME' => absolute_path('.') do example.run end ENV.replace old_env end end
Version data entries
38 entries across 38 versions & 1 rubygems