Temporary base class
# File test/abstract_unit.rb, line 172 def self.testing(klass = nil) if klass @testing = "/#{klass.name.underscore}".sub!(/_controller$/, '') else @testing end end
# File test/abstract_unit.rb, line 188 def assert_body(body) assert_equal body, Array.wrap(response.body).join end
# File test/abstract_unit.rb, line 204 def assert_content_type(type) assert_equal type, response.headers["Content-Type"] end
# File test/abstract_unit.rb, line 208 def assert_header(name, value) assert_equal value, response.headers[name] end
# File test/abstract_unit.rb, line 196 def assert_response(body, status = 200, headers = {}) assert_body body assert_status status headers.each do |header, value| assert_header header, value end end
# File test/abstract_unit.rb, line 192 def assert_status(code) assert_equal code, response.status end
# File test/abstract_unit.rb, line 180 def get(thing, *args) if thing.is_a?(Symbol) super("#{self.class.testing}/#{thing}", *args) else super end end