Class: Fitting::Formatter::Response::MicroYaml
- Inherits:
-
RSpec::Core::Formatters::BaseFormatter
- Object
- RSpec::Core::Formatters::BaseFormatter
- Fitting::Formatter::Response::MicroYaml
- Defined in:
- lib/fitting/formatter/response/micro_yaml.rb
Instance Method Summary collapse
Instance Method Details
#craft_json(report) ⇒ Object
28 29 30 31 32 |
# File 'lib/fitting/formatter/response/micro_yaml.rb', line 28 def craft_json(report) File.open('report_response_micro.yaml', 'w') do |file| file.write(YAML.dump(report)) end end |
#start(_notification) ⇒ Object
12 13 14 |
# File 'lib/fitting/formatter/response/micro_yaml.rb', line 12 def start(_notification) Fitting::Storage::YamlFile.craft end |
#stop(_notification) ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/fitting/formatter/response/micro_yaml.rb', line 16 def stop(_notification) tests = Fitting::Storage::YamlFile.load Fitting::Storage::YamlFile.destroy if tests report = Report::Response::Micro.new(tests).to_hash else report = 'no tests controllers' end craft_json(report) end |