Sha256: e3392ffbb7e891bf7d317b67869074f0f98bd9643f479a9433e4c68a3d8d8e03

Contents?: true

Size: 723 Bytes

Versions: 8

Compression:

Stored size: 723 Bytes

Contents

require 'test_helper'
require 'fake_app'

class VerdictRailsTest < Minitest::Test
  def setup
    Verdict.clear_repository_cache
    new_rails_app = Dummy::Application.new
    new_rails_app.config.eager_load = false
    new_rails_app.initialize!
  end

  def teardown
    Verdict.default_logger = Logger.new("/dev/null")
    Verdict.directory = nil
    Verdict.clear_repository_cache
  end

  def test_verdict_railtie_should_find_directory_path
    assert_equal Verdict.directory, Rails.root.join('app', 'experiments')
  end

  def test_verdict_should_eager_load_discovery
    expected_experiment = Verdict.instance_variable_get('@repository')
    assert expected_experiment.include?("test_rails_app_experiment")
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
verdict-0.16.1 test/verdict_rails_test.rb
verdict-0.16.0 test/verdict_rails_test.rb
verdict-0.15.2 test/verdict_rails_test.rb
verdict-0.15.1 test/verdict_rails_test.rb
verdict-0.15.0 test/verdict_rails_test.rb
verdict-0.14.0 test/verdict_rails_test.rb
verdict-0.13.0 test/verdict_rails_test.rb
verdict-0.12.0 test/verdict_rails_test.rb