Sha256: 9c9089fa6b987eb49d729778ccbe94c14fdae46ec04f0a9cb545c9314b7c10d9

Contents?: true

Size: 785 Bytes

Versions: 17

Compression:

Stored size: 785 Bytes

Contents

# encoding: utf-8
require 'aruba/api'
require 'aruba/reporting'

# 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

RSpec.configure do |c|
  c.include SpecHelper::Aruba
  c.before :each do
    clean_current_dir
    restore_env
  end
end

Version data entries

17 entries across 17 versions & 2 rubygems

Version Path
middleman-presentation-core-0.17.7 spec/support/aruba.rb
middleman-presentation-core-0.17.6 spec/support/aruba.rb
middleman-presentation-core-0.17.5 spec/support/aruba.rb
middleman-presentation-core-0.17.2 spec/support/aruba.rb
middleman-presentation-core-0.17.1 spec/support/aruba.rb
middleman-presentation-core-0.17.0 spec/support/aruba.rb
middleman-presentation-core-0.16.3 spec/support/aruba.rb
middleman-presentation-core-0.16.2 spec/support/aruba.rb
middleman-presentation-core-0.16.0 spec/support/aruba.rb
middleman-presentation-core-0.16.0.rc2 spec/support/aruba.rb
gpx_track_generator-0.3.5 spec/support/aruba.rb
gpx_track_generator-0.3.3 spec/support/aruba.rb
gpx_track_generator-0.3.1 spec/support/aruba.rb
gpx_track_generator-0.3.0 spec/support/aruba.rb
gpx_track_generator-0.2.0 spec/support/aruba.rb
gpx_track_generator-0.1.1 spec/support/aruba.rb
gpx_track_generator-0.0.2 spec/support/aruba.rb