Class: Specdown::Readme
Instance Attribute Summary collapse
-
#file_path ⇒ Object
readonly
Returns the value of attribute file_path.
-
#stats ⇒ Object
readonly
Returns the value of attribute stats.
-
#tests ⇒ Object
readonly
Returns the value of attribute tests.
Instance Method Summary collapse
- #exceptions ⇒ Object
- #execute ⇒ Object
- #file_name ⇒ Object
-
#initialize(file_path) ⇒ Readme
constructor
A new instance of Readme.
- #passing? ⇒ Boolean
- #pending_exceptions ⇒ Object
- #undefined_implicits ⇒ Object
Constructor Details
Instance Attribute Details
#file_path ⇒ Object (readonly)
Returns the value of attribute file_path.
5 6 7 |
# File 'lib/specdown/readme.rb', line 5 def file_path @file_path end |
#stats ⇒ Object (readonly)
Returns the value of attribute stats.
5 6 7 |
# File 'lib/specdown/readme.rb', line 5 def stats @stats end |
#tests ⇒ Object (readonly)
Returns the value of attribute tests.
5 6 7 |
# File 'lib/specdown/readme.rb', line 5 def tests @tests end |
Instance Method Details
#exceptions ⇒ Object
18 19 20 |
# File 'lib/specdown/readme.rb', line 18 def exceptions @tests.collect(&:exception).compact end |
#execute ⇒ Object
35 36 37 38 39 |
# File 'lib/specdown/readme.rb', line 35 def execute @tests.map &:execute self end |
#file_name ⇒ Object
30 31 32 |
# File 'lib/specdown/readme.rb', line 30 def file_name File.basename @file_path end |
#passing? ⇒ Boolean
14 15 16 |
# File 'lib/specdown/readme.rb', line 14 def passing? exceptions.empty? && pending_exceptions.empty? && undefined_implicits.empty? end |
#pending_exceptions ⇒ Object
22 23 24 |
# File 'lib/specdown/readme.rb', line 22 def pending_exceptions exceptions.select {|e| e.exception_class == Specdown::PendingException } end |
#undefined_implicits ⇒ Object
26 27 28 |
# File 'lib/specdown/readme.rb', line 26 def undefined_implicits @tests.collect(&:undefined_implicits).flatten end |