Sha256: bc0665398e201fb9506ae389f43201a8a6abea978d5abae301de6dc299ab72d9

Contents?: true

Size: 647 Bytes

Versions: 3

Compression:

Stored size: 647 Bytes

Contents

require_relative '../helper'

require_relative '../../lib/postageapp/rails/rails'

class RailsInitializationTest < MiniTest::Test
  def test_initialization
    rails = Module.new do
      def self.version
        '9.9.9'
      end

      def self.root
        'RAILS ROOT'
      end

      def self.env
        "RAILS ENV"
      end
    end

    const_replace(:Rails, rails) do
      PostageApp::Rails.initialize
      
      assert_equal 'Rails 9.9.9', PostageApp.configuration.framework
      assert_equal 'RAILS ROOT', PostageApp.configuration.project_root
      assert_equal 'RAILS ENV', PostageApp.configuration.environment
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
postageapp-1.4.2 test/unit/rails_initialization_test.rb
postageapp-1.4.1 test/unit/rails_initialization_test.rb
postageapp-1.4.0 test/unit/rails_initialization_test.rb