Methods
A
P
S
T
Instance Public methods
setup()
# File railties/test/rails_info_test.rb, line 12
def setup
  Rails.send :remove_const, :Info
  silence_warnings { load 'rails/info.rb' }
end
test_html_includes_middleware()
# File railties/test/rails_info_test.rb, line 45
def test_html_includes_middleware
  Rails::Info.module_eval do
    property 'Middleware', ['Rack::Lock', 'Rack::Static']
  end

  html = Rails::Info.to_html
  assert html.include?('<tr><td class="name">Middleware</td>')
  properties.value_for('Middleware').each do |value|
    assert html.include?("<li>#{CGI.escapeHTML(value)}</li>")
  end
end
test_property_with_block()
# File railties/test/rails_info_test.rb, line 33
def test_property_with_block
  Rails::Info.module_eval do
    property('Goodbye') {'World'}
  end
  assert_property 'Goodbye', 'World'
end
test_property_with_block_swallows_exceptions_and_ignores_property()
# File railties/test/rails_info_test.rb, line 17
def test_property_with_block_swallows_exceptions_and_ignores_property
  assert_nothing_raised do
    Rails::Info.module_eval do
      property('Bogus') {raise}
    end
  end
  assert !property_defined?('Bogus')
end
test_property_with_string()
# File railties/test/rails_info_test.rb, line 26
def test_property_with_string
  Rails::Info.module_eval do
    property 'Hello', 'World'
  end
  assert_property 'Hello', 'World'
end
test_rails_version()
# File railties/test/rails_info_test.rb, line 40
def test_rails_version
  assert_property 'Rails version',
    File.read(File.realpath('../../../RAILS_VERSION', __FILE__)).chomp
end
Instance Protected methods
assert_property(property_name, value)
# File railties/test/rails_info_test.rb, line 66
def assert_property(property_name, value)
  raise "Property #{property_name.inspect} not defined" unless
    property_defined? property_name
  assert_equal value, properties.value_for(property_name)
end
properties()
# File railties/test/rails_info_test.rb, line 58
def properties
  Rails::Info.properties
end
property_defined?(property_name)
# File railties/test/rails_info_test.rb, line 62
def property_defined?(property_name)
  properties.names.include? property_name
end