diff options
author | Sam Stephenson <sam@37signals.com> | 2005-11-05 14:30:47 +0000 |
---|---|---|
committer | Sam Stephenson <sam@37signals.com> | 2005-11-05 14:30:47 +0000 |
commit | 71b032a0a6a4f68354db7cb41e77443aa091580b (patch) | |
tree | acd7a0246f7919fa791d74224432ee98cf7968ad /railties/test/info_test.rb | |
parent | 1f6b09f67c7d15e4db5960a09ad3b724a1e01d7f (diff) | |
download | rails-71b032a0a6a4f68354db7cb41e77443aa091580b.tar.gz rails-71b032a0a6a4f68354db7cb41e77443aa091580b.tar.bz2 rails-71b032a0a6a4f68354db7cb41e77443aa091580b.zip |
Added script/about to display formatted Rails::Info output
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2883 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties/test/info_test.rb')
-rw-r--r-- | railties/test/info_test.rb | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/railties/test/info_test.rb b/railties/test/info_test.rb index 2c6e28779d..8faef428a8 100644 --- a/railties/test/info_test.rb +++ b/railties/test/info_test.rb @@ -57,21 +57,17 @@ class InfoTest < Test::Unit::TestCase end protected - def property_names - Rails::Info.properties.map {|(name, )| name} + def properties + Rails::Info.properties end - - def property_value(property_name) - Rails::Info.properties.find {|(name, )| property_name == name}.last - end - + def property_defined?(property_name) - property_names.include? property_name + properties.names.include? property_name end def assert_property(property_name, value) raise "Property #{property_name.inspect} not defined" unless property_defined? property_name - assert_equal value, property_value(property_name) + assert_equal value, properties.value_for(property_name) end end
\ No newline at end of file |