Sha256: 744d7912288d3a8ab1f391306e444302e989ef00392642b537513d7d3face98b

Contents?: true

Size: 769 Bytes

Versions: 11

Compression:

Stored size: 769 Bytes

Contents

require 'rubygems'
require 'bundler/setup'

ENV["RAILS_ENV"] ||= 'test'

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

11 entries across 11 versions & 1 rubygems

Version Path
foreman_discovery-5.0.0 test/test_helper.rb
foreman_discovery-4.1.2 test/test_helper.rb
foreman_discovery-4.1.1 test/test_helper.rb
foreman_discovery-4.1.0 test/test_helper.rb
foreman_discovery-4.0.0 test/test_helper.rb
foreman_discovery-2.0.2 test/test_helper.rb
foreman_discovery-2.0.1 test/test_helper.rb
foreman_discovery-3.0.0 test/test_helper.rb
foreman_discovery-2.0.0 test/test_helper.rb
foreman_discovery-2.0.0.rc2 test/test_helper.rb
foreman_discovery-2.0.0.rc1 test/test_helper.rb