Sha256: ddcbd7e258b11dad60c90fda8f2c207c61b8f8d440820b41f94d16d441318a13

Contents?: true

Size: 848 Bytes

Versions: 13

Compression:

Stored size: 848 Bytes

Contents

require 'rubygems'
require 'bundler/setup'

ENV["RAILS_ENV"] ||= 'test'
require File.expand_path("../../.foreman_app/config/environment.rb", __FILE__)

require 'test/unit'
require 'foreman_discovery'
require 'rails/test_help'

Rails.backtrace_cleaner.remove_silencers!

class ActiveSupport::TestCase
  # Setup all fixtures in test/fixtures/*.(yml|csv) for all tests in alphabetical order.
  #
  # Note: You'll currently still have to declare fixtures explicitly in integration tests
  # -- they do not yet inherit this setting

  foreman_dir =  File.expand_path("../../.foreman_app", File.join(Dir.pwd, __FILE__))
  fixture_path=File.join(foreman_dir, "test/fixtures")
  fixtures :all

  set_fixture_class({ :hosts => Host::Base })
end

def set_session_user
  SETTINGS[:login] ? {:user => User.admin.id, :expires_at => 5.minutes.from_now} : {}
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
foreman_discovery-1.4.1 test/test_helper.rb
foreman_discovery-1.4.0 test/test_helper.rb
foreman_discovery-1.4.0.rc4 test/test_helper.rb
foreman_discovery-1.4.0.rc3 test/test_helper.rb
foreman_discovery-1.4.0.rc2 test/test_helper.rb
foreman_discovery-1.4.0.rc1 test/test_helper.rb
foreman_discovery-1.3.0 test/test_helper.rb
foreman_discovery-1.3.0.rc3 test/test_helper.rb
foreman_discovery-1.3.0.rc2 test/test_helper.rb
foreman_discovery-1.3.0.rc1 test/test_helper.rb
foreman_discovery-1.2.0 test/test_helper.rb
foreman_discovery-1.2.0.rc2 test/test_helper.rb
foreman_discovery-1.2.0.rc1 test/test_helper.rb