diff options
-rw-r--r-- | railties/builtin/rails_info/rails/info.rb | 16 | ||||
-rw-r--r-- | railties/test/rails_info_test.rb | 10 |
2 files changed, 13 insertions, 13 deletions
diff --git a/railties/builtin/rails_info/rails/info.rb b/railties/builtin/rails_info/rails/info.rb index 4cbd2cca4a..7b6f09ac69 100644 --- a/railties/builtin/rails_info/rails/info.rb +++ b/railties/builtin/rails_info/rails/info.rb @@ -20,13 +20,13 @@ module Rails rescue Exception end - def components + def frameworks %w( active_record action_pack active_resource action_mailer active_support ) end - def component_version(component) - require "#{component}/version" - "#{component.classify}::VERSION::STRING".constantize + def framework_version(framework) + require "#{framework}/version" + "#{framework.classify}::VERSION::STRING".constantize end def edge_rails_revision(info = git_info) @@ -90,11 +90,11 @@ module Rails Rails::VERSION::STRING end - # Versions of each Rails component (Active Record, Action Pack, + # Versions of each Rails framework (Active Record, Action Pack, # Active Resource, Action Mailer, and Active Support). - components.each do |component| - property "#{component.titlecase} version" do - component_version(component) + frameworks.each do |framework| + property "#{framework.titlecase} version" do + framework_version(framework) end end diff --git a/railties/test/rails_info_test.rb b/railties/test/rails_info_test.rb index 3e91e2f2ee..9befd44a58 100644 --- a/railties/test/rails_info_test.rb +++ b/railties/test/rails_info_test.rb @@ -61,14 +61,14 @@ EOS assert_property 'Goodbye', 'World' end - def test_component_version + def test_framework_version assert_property 'Active Support version', ActiveSupport::VERSION::STRING end - def test_components_exist - Rails::Info.components.each do |component| - dir = File.dirname(__FILE__) + "/../../" + component.gsub('_', '') - assert File.directory?(dir), "#{component.classify} does not exist" + def test_frameworks_exist + Rails::Info.frameworks.each do |framework| + dir = File.dirname(__FILE__) + "/../../" + framework.gsub('_', '') + assert File.directory?(dir), "#{framework.classify} does not exist" end end |