Sha256: dd5a3c9214062904a7373a29ac0e60e561c4b0d0d8f5951ceb8370b6dff02278

Contents?: true

Size: 538 Bytes

Versions: 2

Compression:

Stored size: 538 Bytes

Contents

ENV['RACK_ENV'] = 'test'
require "socket"
require "minitest"
require "minitest/autorun"
require "minitest/pride"
require "swiss_admin"
require 'rack/test'
require File.expand_path '../../lib/swiss_admin/web/app.rb', __FILE__

module SwissAdmin
  module TestHelpers
    def self.hostname
      Socket.gethostname
    end

    def self.first_ipv4
      Socket.ip_address_list.detect{|intf| intf.ipv4_private?}.ip_address
    end

    def self.current_user
      `whoami`.strip
    end

    def self.home
      ENV["HOME"]
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
swiss_admin-0.7.0 test/test_helper.rb
swiss_admin-0.6.1 test/test_helper.rb