Class: SmashingDocs::TestCase

Inherits:
Object
  • Object
show all
Defined in:
lib/test_case.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(request, response, information = {}) ⇒ TestCase

Returns a new instance of TestCase.



7
8
9
10
# File 'lib/test_case.rb', line 7

def initialize(request, response, information = {})
  @request, @response, @information = request, response, information
  @created_at = Time.now
end

Instance Attribute Details

#created_atObject (readonly)

Returns the value of attribute created_at.



4
5
6
# File 'lib/test_case.rb', line 4

def created_at
  @created_at
end

#informationObject (readonly)

Returns the value of attribute information.



4
5
6
# File 'lib/test_case.rb', line 4

def information
  @information
end

#requestObject (readonly)

Returns the value of attribute request.



4
5
6
# File 'lib/test_case.rb', line 4

def request
  @request
end

#responseObject (readonly)

Returns the value of attribute response.



4
5
6
# File 'lib/test_case.rb', line 4

def response
  @response
end

#templateObject

Returns the value of attribute template.



5
6
7
# File 'lib/test_case.rb', line 5

def template
  @template
end

Instance Method Details

#compile_templateObject



12
13
14
# File 'lib/test_case.rb', line 12

def compile_template
  ERB.new(template).result binding
end