Sha256: 4bde0c1db5cebfd502fc1ce0e07d2f22325f875746c98d512b3d345784afd1ff

Contents?: true

Size: 1.54 KB

Versions: 15

Compression:

Stored size: 1.54 KB

Contents

# Configure Rails Environment
ENV["RAILS_ENV"] = "test"

require File.expand_path("../../test/dummy/config/environment.rb",  __FILE__)
ActiveRecord::Migrator.migrations_paths = [File.expand_path("../../test/dummy/db/migrate", __FILE__)]
require "rails/test_help"
require "minitest/reporters"

# configure minitest reporting
reporter_options = { color: true }
Minitest::Reporters.use! Minitest::Reporters::SpecReporter.new(reporter_options)

# Filter out Minitest backtrace while allowing backtrace from other libraries
# to be shown.
Minitest.backtrace_filter = Minitest::BacktraceFilter.new


# Load support files
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }

# Load fixtures from the engine
if ActiveSupport::TestCase.respond_to?(:fixture_path=)
  ActiveSupport::TestCase.fixture_path = File.expand_path("../fixtures", __FILE__)
  ActionDispatch::IntegrationTest.fixture_path = ActiveSupport::TestCase.fixture_path
  ActiveSupport::TestCase.fixtures :all
end



def assert_false(actual_value, message = nil)
  assert_equal false, actual_value, "#{message} was expected to be false, is #{actual_value}"
end


def assert_true(actual_value, message = nil)
  assert_equal true, actual_value, "#{message} was expected to be true, is #{actual_value}"
end


def assert_html_equal(actual_html, expected_html)
  assert_equal(squash_html(actual_html), squash_html(expected_html), "\nExpected: #{squash_html(expected_html)}\nGot:      #{squash_html(actual_html)}")
end

def squash_html(html)
  html.gsub("\n", "").gsub(/\s*</, "<").gsub(/>\s*/, ">")
end



Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
gov_uk_date_fields-1.2.3 test/test_helper.rb
gov_uk_date_fields-1.2.2 test/test_helper.rb
gov_uk_date_fields-1.2.1 test/test_helper.rb
gov_uk_date_fields-1.2.0 test/test_helper.rb
gov_uk_date_fields-1.1.0 test/test_helper.rb
gov_uk_date_fields-1.0.9 test/test_helper.rb
gov_uk_date_fields-1.0.8 test/test_helper.rb
gov_uk_date_fields-1.0.7 test/test_helper.rb
gov_uk_date_fields-1.0.6 test/test_helper.rb
gov_uk_date_fields-1.0.5 test/test_helper.rb
gov_uk_date_fields-1.0.4 test/test_helper.rb
gov_uk_date_fields-1.0.3 test/test_helper.rb
gov_uk_date_fields-1.0.2 test/test_helper.rb
gov_uk_date_fields-1.0.1 test/test_helper.rb
gov_uk_date_fields-1.0.0 test/test_helper.rb