testscript_engine 0.0.0 → 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 62797fbc421b27cc8445d64ad741cb2272cf25d33ecbc27e62bbfbafa494d789
4
- data.tar.gz: 9fbb57ad276b50107d7bd4eb9ca9a58c9f4137e0efa177dbf9e13b6ac9b23c84
3
+ metadata.gz: 45459e02c0683f9aad8a5ab7013e95f225ad19c5bdaf75cb1914c64db09743b7
4
+ data.tar.gz: 475d8d9141e76022f2fc67575c50999bd3d1a9e4601a4370edb40f346a70e4fa
5
5
  SHA512:
6
- metadata.gz: f97edd627ee92665dde3491725ebabe1fb7309d43edfce3afc7e5bd923746cae05aa4dceefc29c77155d237da208f6acd19c41ef4b7b51336fb801b6de3cb881
7
- data.tar.gz: e6e6afe08421e2812604a6834a0e9e05d89018b43fb07543867e314a67816689c41611db444967597e7cd3dfa1de19653b474eeece6a28ddbccd5b168d77978b
6
+ metadata.gz: cfeeb1b3343e76341c88870b907bd71ca3b56da01d9922ec9cc19aa9f9d2d97ed3789e9c532027bbd43b8f2ee76afda22e875ea5a762bd7a975ee78b66f39b23
7
+ data.tar.gz: ef9d602b60fa847b3014dd73e407d34dadc92073d4000e63febc558ad6cd37e3e4bfa9588d1947a8be7c7145210a5beae848cafbce99105bd94d9bfc1440a54b
@@ -1,4 +1,6 @@
1
1
  # frozen_string_literal: true
2
+ require 'jsonpath'
3
+
2
4
  module Assertion
3
5
  class AssertionException < StandardError
4
6
  attr_reader :details, :outcome
@@ -101,8 +101,12 @@ class TestScriptRunnable
101
101
  end
102
102
 
103
103
  def handle_actions(actions, end_on_fail)
104
- return abort_test(actions) if @ended
105
104
  @modify_report = true
105
+ if @ended
106
+ abort_test(actions)
107
+ @modify_report = false
108
+ return
109
+ end
106
110
  current_action = 0
107
111
 
108
112
  begin
@@ -122,6 +126,7 @@ class TestScriptRunnable
122
126
  @ended = true
123
127
  fail(:eval_assert_result, ae.details)
124
128
  cascade_skips_with_message(actions, current_action) unless current_action == actions.length
129
+ @modify_report = false
125
130
  return
126
131
  else
127
132
  fail(:eval_assert_result, ae.details)
@@ -126,7 +126,9 @@ class TestScriptEngine
126
126
  FileUtils.mkdir_p report_directory
127
127
 
128
128
  reports.each do |_, report|
129
- File.open("#{report_directory}/#{report.name.downcase.split(' ')[1...].join('_')}.json", 'w') do |f|
129
+ report_name = report.name.downcase.split(' ')[1...].join('_')
130
+ report_name = report.name.downcase.split('_')[0...].join('_') if report_name == ""
131
+ File.open("#{report_directory}/#{report_name}.json", 'w') do |f|
130
132
  f.write(report.to_json)
131
133
  end
132
134
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: testscript_engine
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.0
4
+ version: 0.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Fraser