Sha256: e8f2c34a25c741ae8698cd04d4a74c12d46b7a8d8a500a2cff7347d1f9ff7c80
Contents?: true
Size: 549 Bytes
Versions: 75
Compression:
Stored size: 549 Bytes
Contents
require 'singleton' module SpecInfra module Backend class ShellScript < Base def initialize @lines = [ "#!/bin/sh", "" ] ObjectSpace.define_finalizer(self, Writer.new("spec.sh", @lines)) end def run_command(cmd, opts={}) @lines << cmd CommandResult.new end class Writer def initialize(file, lines) @file = file @lines = lines end def call(*args) File.write(@file, @lines.join("\n")) end end end end end
Version data entries
75 entries across 75 versions & 1 rubygems