Sha256: 6f8755ba60888d703ba21e7bed1452d01316165867ababd14cd02493c24d16bd

Contents?: true

Size: 715 Bytes

Versions: 6

Compression:

Stored size: 715 Bytes

Contents

module Wukong
  module Local
    module IntegrationHelper

      def root
        @root ||= Pathname.new(File.expand_path('../../..', __FILE__))
      end

      def lib_dir *args
        root.join('lib', *args)
      end

      def bin_dir *args
        root.join('bin', *args)
      end
      
      def examples_dir *args
        root.join('examples', *args)
      end

      def integration_env
        {
          "PATH"    => [bin_dir.to_s, ENV["PATH"]].compact.join(':'),
          "RUBYLIB" => [lib_dir.to_s, ENV["RUBYLIB"]].compact.join(':')
        }
      end

      def integration_cwd
        root.to_s
      end

      def example_script *args
        examples_dir(*args)
      end

    end
  end
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
ul-wukong-4.1.1 spec/support/integration_helper.rb
ul-wukong-4.1.0 spec/support/integration_helper.rb
wukong-4.0.0 spec/support/integration_helper.rb
wukong-3.0.1 spec/support/integration_helper.rb
wukong-3.0.0 spec/support/integration_helper.rb
wukong-3.0.0.pre3 spec/support/integration_helper.rb