Instiki 0.16.5

Update to Rails 2.3.2 (the stable Rails 2.3 release).
Add audio/speex support
Update CHANGELOG
Bump version number
This commit is contained in:
Jacques Distler 2009-03-16 09:55:30 -05:00
parent 801d307405
commit e2ccdfd812
264 changed files with 4850 additions and 1906 deletions

View file

@ -4,10 +4,12 @@ class MemoizableTest < Test::Unit::TestCase
class Person
extend ActiveSupport::Memoizable
attr_reader :name_calls, :age_calls
attr_reader :name_calls, :age_calls, :is_developer_calls
def initialize
@name_calls = 0
@age_calls = 0
@is_developer_calls = 0
end
def name
@ -31,6 +33,14 @@ class MemoizableTest < Test::Unit::TestCase
end
memoize :name, :age
private
def is_developer?
@is_developer_calls += 1
"Yes"
end
memoize :is_developer?
end
class Company
@ -223,4 +233,15 @@ class MemoizableTest < Test::Unit::TestCase
company.memoize :name
assert_raise(RuntimeError) { company.memoize :name }
end
def test_private_method_memoization
person = Person.new
assert_raise(NoMethodError) { person.is_developer? }
assert_equal "Yes", person.send(:is_developer?)
assert_equal 1, person.is_developer_calls
assert_equal "Yes", person.send(:is_developer?)
assert_equal 1, person.is_developer_calls
end
end