Sha256: 266499ab0dbe8ef862b2d48ca690dae45f86b9e81682711e6cf10a2c7ccae213

Contents?: true

Size: 820 Bytes

Versions: 7

Compression:

Stored size: 820 Bytes

Contents

require 'rubygems'
require 'bundler/setup'

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

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

7 entries across 7 versions & 1 rubygems

Version Path
foreman_discovery-1.1.1 test/test_helper.rb
foreman_discovery-1.0.2 test/test_helper.rb
foreman_discovery-1.0.0 test/test_helper.rb
foreman_discovery-1.0.0.rc4 test/test_helper.rb
foreman_discovery-1.0.0.rc3 test/test_helper.rb
foreman_discovery-1.0.0.rc2 test/test_helper.rb
foreman_discovery-1.0.0.rc1 test/test_helper.rb