Sha256: 43a56c83cdf9faa431cad903b123632f6db20c727d67c03e6735293dd808fd9c

Contents?: true

Size: 739 Bytes

Versions: 6

Compression:

Stored size: 739 Bytes

Contents

require File.dirname(__FILE__) + '/helper'

class TestCore < Test::Unit::TestCase

  context 'for core functionality' do

    should 'check some global methods' do
      assert_respond_to Padrino, :env
      assert_respond_to Padrino, :root
      assert_respond_to Padrino, :load!
      assert_respond_to Padrino, :reload!
      assert_respond_to Padrino, :version
    end

    should 'validate global helpers' do
      assert_equal :test, Padrino.env
      assert_match /\/test/, Padrino.root
    end
    
    should 'raise application error if I instantiate a new padrino application without mounted apps' do
      Padrino.mounted_apps.clear
      assert_raise(Padrino::ApplicationLoadError) { Padrino.application.new }
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
padrino-core-0.6.3 test/test_core.rb
padrino-core-0.6.2 test/test_core.rb
padrino-core-0.6.1 test/test_core.rb
padrino-core-0.5.0 test/test_core.rb
padrino-core-0.4.6 test/test_core.rb
padrino-core-0.4.5 test/test_core.rb