Sha256: b7631599948e8daea384c0a1248a906dbff954e753ac6b69e2e6bd0e6152ec7f

Contents?: true

Size: 726 Bytes

Versions: 1

Compression:

Stored size: 726 Bytes

Contents

require 'test_helper'

class SettingsTest < Test::Unit::TestCase
  test "Settings" do
    Aura.set('site.name', 'Hello')
    assert_equal 'Hello', Aura.get('site.name')
  end

  test "Default settings" do
    assert_equal nil, Aura.get('jiggawatts')

    # Should do it's thing.
    Aura.default('jiggawatts', 1210)
    assert_equal 1210, Aura.get('jiggawatts')

    # Should not change.
    Aura.default('jiggawatts', 31337)
    assert_equal 1210, Aura.get('jiggawatts')

    # *Should* change.
    Aura.set('jiggawatts', 31337)
    assert_equal 31337, Aura.get('jiggawatts')

    # Should delete properly.
    last = Aura.del('jiggawatts')
    assert_equal 31337, last
    assert_equal nil, Aura.get('jiggawatts')
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
aura-0.0.1.pre10 test/unit/settings_test.rb