Sha256: 409e3c9545ed028bbb44d3c4f252713a8f5c07c770047420b35360da9f99bf48

Contents?: true

Size: 783 Bytes

Versions: 10

Compression:

Stored size: 783 Bytes

Contents

require 'test_helper'

class RailtieTest < SecondBase::TestCase

  def test_config
    expected_path = 'db/secondbase'
    assert_equal expected_path, railtie_inst.config.second_base.path
    assert_equal expected_path, railtie_klass.config.second_base.path
    expected_config_key = 'secondbase'
    assert_equal expected_config_key, railtie_inst.config.second_base.config_key
    assert_equal expected_config_key, railtie_klass.config.second_base.config_key
  end

  def test_fullpath
    expected = dummy_db.join('secondbase').to_s
    assert_equal expected, railtie_inst.fullpath
    assert_equal expected, railtie_klass.fullpath
  end


  private

  def railtie_inst
    dummy_app.railties.grep(railtie_klass).first
  end

  def railtie_klass
    SecondBase::Railtie
  end

end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
secondbase-2.2.0 test/cases/railtie_test.rb
secondbase-2.1.6 test/cases/railtie_test.rb
secondbase-2.1.5 test/cases/railtie_test.rb
secondbase-2.1.4 test/cases/railtie_test.rb
secondbase-2.1.3 test/cases/railtie_test.rb
secondbase-2.1.2 test/cases/railtie_test.rb
secondbase-2.1.0 test/cases/railtie_test.rb
secondbase-2.0.0 test/cases/railtie_test.rb
secondbase-1.0.1 test/cases/railtie_test.rb
secondbase-1.0.0 test/cases/railtie_test.rb