diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index cd0a933d..abb0e2f9 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -12,6 +12,7 @@ jobs: matrix: ruby-version: - '3.0' + - '3.1' env: CC_TEST_REPORTER_ID: "${{ secrets.CC_TEST_REPORTER_ID }}" steps: diff --git a/spec/support/camcorder_helper.rb b/spec/support/camcorder_helper.rb index c33709b4..a3698bce 100644 --- a/spec/support/camcorder_helper.rb +++ b/spec/support/camcorder_helper.rb @@ -35,4 +35,17 @@ def self.deintercept_all @intercepted_constructors = [] end private_class_method :deintercept_all + + class Recorder + def start + if File.exists?(filename) + contents = File.read(filename) + @recordings = YAML.respond_to?(:safe_load) ? YAML.safe_load(contents, :permitted_classes => [Camcorder::Recording, Symbol]) : YAML.load(contents) + @replaying = true + else + @recordings = {} + @replaying = false + end + end + end end