Class: CabezaDeTermo::JsonSpec::ExpectationReport
- Inherits:
-
Object
- Object
- CabezaDeTermo::JsonSpec::ExpectationReport
- Defined in:
- lib/cabeza-de-termo/json-spec/walkers/reporter/expectation-report.rb
Instance Method Summary collapse
- #expectation_method ⇒ Object
- #failed? ⇒ Boolean
- #failed_message ⇒ Object
-
#initialize ⇒ ExpectationReport
constructor
A new instance of ExpectationReport.
- #set_expectation_method(expectation_method) ⇒ Object
- #set_failed_message(failed_message) ⇒ Object
- #set_status(status) ⇒ Object
- #set_was_satisfied(was_satisfied) ⇒ Object
- #status ⇒ Object
- #to_array ⇒ Object
- #was_satisfied? ⇒ Boolean
Constructor Details
#initialize ⇒ ExpectationReport
Returns a new instance of ExpectationReport.
4 5 6 7 8 9 10 |
# File 'lib/cabeza-de-termo/json-spec/walkers/reporter/expectation-report.rb', line 4 def initialize() super() @expectation_method = nil @failed_message = nil @status = nil end |
Instance Method Details
#expectation_method ⇒ Object
18 19 20 |
# File 'lib/cabeza-de-termo/json-spec/walkers/reporter/expectation-report.rb', line 18 def expectation_method() @expectation_method end |
#failed? ⇒ Boolean
46 47 48 |
# File 'lib/cabeza-de-termo/json-spec/walkers/reporter/expectation-report.rb', line 46 def failed?() status == :failed end |
#failed_message ⇒ Object
28 29 30 |
# File 'lib/cabeza-de-termo/json-spec/walkers/reporter/expectation-report.rb', line 28 def () @failed_message end |
#set_expectation_method(expectation_method) ⇒ Object
12 13 14 15 16 |
# File 'lib/cabeza-de-termo/json-spec/walkers/reporter/expectation-report.rb', line 12 def set_expectation_method(expectation_method) @expectation_method = expectation_method self end |
#set_failed_message(failed_message) ⇒ Object
22 23 24 25 26 |
# File 'lib/cabeza-de-termo/json-spec/walkers/reporter/expectation-report.rb', line 22 def () @failed_message = self end |
#set_status(status) ⇒ Object
32 33 34 35 36 |
# File 'lib/cabeza-de-termo/json-spec/walkers/reporter/expectation-report.rb', line 32 def set_status(status) @status = status self end |
#set_was_satisfied(was_satisfied) ⇒ Object
42 43 44 |
# File 'lib/cabeza-de-termo/json-spec/walkers/reporter/expectation-report.rb', line 42 def set_was_satisfied(was_satisfied) set_status(was_satisfied ? :was_satisfied : :failed) end |
#status ⇒ Object
38 39 40 |
# File 'lib/cabeza-de-termo/json-spec/walkers/reporter/expectation-report.rb', line 38 def status() @status end |
#to_array ⇒ Object
54 55 56 57 58 59 60 |
# File 'lib/cabeza-de-termo/json-spec/walkers/reporter/expectation-report.rb', line 54 def to_array() [ expectation_method, status, ] end |
#was_satisfied? ⇒ Boolean
50 51 52 |
# File 'lib/cabeza-de-termo/json-spec/walkers/reporter/expectation-report.rb', line 50 def was_satisfied?() status == :was_satisfied end |