Sha256: 01f2d937ee4bd7a8fca80df96d20e3ca8145220980d3bff07613e71874e397e4

Contents?: true

Size: 297 Bytes

Versions: 11

Compression:

Stored size: 297 Bytes

Contents

require 'helper'

class CacheTest < Test::Unit::TestCase
  def test_caching
    App::Cache.clear
    
    done = 0

    r = App.cached("six") { done += 1; 2 * 3 }
    assert_equal([1, 6], [done, r])
    
    r = App.cached("six") { done += 1; 2 * 3 }
    assert_equal([1, 6], [done, r])
  end
end

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
radiospieler-0.3.0 test/cache_test.rb
radiospiel-app-0.2.10 test/cache_test.rb
radiospiel-app-0.2.9 test/cache_test.rb
radiospiel-app-0.2.7 test/cache_test.rb
radiospiel-app-0.2.6 test/cache_test.rb
radiospiel-app-0.2.5 test/cache_test.rb
radiospiel-app-0.2.3 test/cache_test.rb
radiospiel-app-0.2.2 test/cache_test.rb
radiospiel-app-0.2.1 test/cache_test.rb
radiospiel-app-0.2.0 test/cache_test.rb
radiospiel-app-0.1.1 test/cache_test.rb