Class: SmashingDocs::TestCase
- Inherits:
-
Object
- Object
- SmashingDocs::TestCase
- Defined in:
- lib/test_case.rb
Instance Attribute Summary collapse
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#information ⇒ Object
readonly
Returns the value of attribute information.
-
#request ⇒ Object
readonly
Returns the value of attribute request.
-
#response ⇒ Object
readonly
Returns the value of attribute response.
-
#template ⇒ Object
Returns the value of attribute template.
Instance Method Summary collapse
- #compile_template ⇒ Object
-
#initialize(request, response, information = {}) ⇒ TestCase
constructor
A new instance of TestCase.
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_at ⇒ Object (readonly)
Returns the value of attribute created_at.
4 5 6 |
# File 'lib/test_case.rb', line 4 def created_at @created_at end |
#information ⇒ Object (readonly)
Returns the value of attribute information.
4 5 6 |
# File 'lib/test_case.rb', line 4 def information @information end |
#request ⇒ Object (readonly)
Returns the value of attribute request.
4 5 6 |
# File 'lib/test_case.rb', line 4 def request @request end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
4 5 6 |
# File 'lib/test_case.rb', line 4 def response @response end |
#template ⇒ Object
Returns the value of attribute template.
5 6 7 |
# File 'lib/test_case.rb', line 5 def template @template end |
Instance Method Details
#compile_template ⇒ Object
12 13 14 |
# File 'lib/test_case.rb', line 12 def compile_template ERB.new(template).result binding end |