Sha256: 9919c568d4e22d521473000aad7e3a201239909e8194957df28f024da3388264

Contents?: true

Size: 885 Bytes

Versions: 20

Compression:

Stored size: 885 Bytes

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
    restore_env
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
fedux_org-stdlib-0.8.8 spec/support/aruba.rb
fedux_org-stdlib-0.8.7 spec/support/aruba.rb
fedux_org-stdlib-0.8.6 spec/support/aruba.rb
fedux_org-stdlib-0.8.5 spec/support/aruba.rb
fedux_org-stdlib-0.8.4 spec/support/aruba.rb
fedux_org-stdlib-0.8.3 spec/support/aruba.rb
fedux_org-stdlib-0.8.0 spec/support/aruba.rb
fedux_org-stdlib-0.7.33 spec/support/aruba.rb
fedux_org-stdlib-0.7.31 spec/support/aruba.rb
fedux_org-stdlib-0.7.30 spec/support/aruba.rb
fedux_org-stdlib-0.7.29 spec/support/aruba.rb
fedux_org-stdlib-0.7.28 spec/support/aruba.rb
fedux_org-stdlib-0.7.27 spec/support/aruba.rb
fedux_org-stdlib-0.7.26 spec/support/aruba.rb
fedux_org-stdlib-0.7.25 spec/support/aruba.rb
fedux_org-stdlib-0.7.24 spec/support/aruba.rb
fedux_org-stdlib-0.7.23 spec/support/aruba.rb
fedux_org-stdlib-0.7.22 spec/support/aruba.rb
fedux_org-stdlib-0.7.21 spec/support/aruba.rb
fedux_org-stdlib-0.7.20 spec/support/aruba.rb