Class: Fitting::Report::Test
- Inherits:
-
Object
- Object
- Fitting::Report::Test
- Defined in:
- lib/fitting/report/test.rb
Instance Method Summary collapse
- #body ⇒ Object
- #id ⇒ Object
-
#initialize(test) ⇒ Test
constructor
A new instance of Test.
- #is_there_a_prefix? ⇒ Boolean
- #is_there_an_actions? ⇒ Boolean
- #is_there_an_combinations? ⇒ Boolean
- #is_there_an_responses? ⇒ Boolean
- #mark_action ⇒ Object
- #mark_combination ⇒ Object
- #mark_prefix ⇒ Object
- #mark_response ⇒ Object
- #method ⇒ Object
- #path ⇒ Object
- #status ⇒ Object
- #to_h ⇒ Object
Constructor Details
#initialize(test) ⇒ Test
Returns a new instance of Test.
4 5 6 7 8 9 10 11 |
# File 'lib/fitting/report/test.rb', line 4 def initialize(test) @test = test @prefix = false @action = false @response = false @combination = false @id = SecureRandom.hex end |
Instance Method Details
#body ⇒ Object
38 39 40 |
# File 'lib/fitting/report/test.rb', line 38 def body @test['response']['body'] end |
#id ⇒ Object
13 14 15 |
# File 'lib/fitting/report/test.rb', line 13 def id @id end |
#is_there_a_prefix? ⇒ Boolean
58 59 60 |
# File 'lib/fitting/report/test.rb', line 58 def is_there_a_prefix? @prefix end |
#is_there_an_actions? ⇒ Boolean
62 63 64 |
# File 'lib/fitting/report/test.rb', line 62 def is_there_an_actions? @action end |
#is_there_an_combinations? ⇒ Boolean
70 71 72 |
# File 'lib/fitting/report/test.rb', line 70 def is_there_an_combinations? @combination end |
#is_there_an_responses? ⇒ Boolean
66 67 68 |
# File 'lib/fitting/report/test.rb', line 66 def is_there_an_responses? @response end |
#mark_action ⇒ Object
46 47 48 |
# File 'lib/fitting/report/test.rb', line 46 def mark_action @action = true end |
#mark_combination ⇒ Object
54 55 56 |
# File 'lib/fitting/report/test.rb', line 54 def mark_combination @combination = true end |
#mark_prefix ⇒ Object
42 43 44 |
# File 'lib/fitting/report/test.rb', line 42 def mark_prefix @prefix = true end |
#mark_response ⇒ Object
50 51 52 |
# File 'lib/fitting/report/test.rb', line 50 def mark_response @response = true end |
#method ⇒ Object
30 31 32 |
# File 'lib/fitting/report/test.rb', line 30 def method @test['method'] end |
#path ⇒ Object
26 27 28 |
# File 'lib/fitting/report/test.rb', line 26 def path @test['path'] end |
#status ⇒ Object
34 35 36 |
# File 'lib/fitting/report/test.rb', line 34 def status @test['response']['status'].to_s end |
#to_h ⇒ Object
17 18 19 20 21 22 23 24 |
# File 'lib/fitting/report/test.rb', line 17 def to_h { path: path, method: method, status: status, body: body } end |