Sha256: c88b5a3d9eb694953909285114d40833dceb4c826cccc2475c8062616058bdcd

Contents?: true

Size: 678 Bytes

Versions: 11

Compression:

Stored size: 678 Bytes

Contents

require 'simplecov'
SimpleCov.start

require 'rspec/given'
require 'tempfile'
require 'tmpdir'
require 'webmock/rspec'

require 'schema_dev/config'

def in_tmpdir
  Dir.mktmpdir do |dir|
    Dir.chdir(dir) do
      yield
    end
  end
end

def suppress_stdout_stderr
  save_stdout = STDOUT.dup
  save_stderr = STDERR.dup
  begin
    Tempfile.open do |f|
      STDOUT.reopen f
      STDERR.reopen f
      yield
    end
  ensure
    STDERR.reopen save_stderr
    STDOUT.reopen save_stdout
  end
end


def get_config(data)
  SchemaDev::Config._reset
  in_tmpdir do
    Pathname.new(SchemaDev::CONFIG_FILE).open("w") {|f| f.write data.to_yaml }
    SchemaDev::Config.load
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
schema_dev-4.0.0 spec/spec_helper.rb
schema_dev-3.13.1 spec/spec_helper.rb
schema_dev-3.13.0 spec/spec_helper.rb
schema_dev-3.12.1 spec/spec_helper.rb
schema_dev-3.12.0 spec/spec_helper.rb
schema_dev-3.11.2 spec/spec_helper.rb
schema_dev-3.11.1 spec/spec_helper.rb
schema_dev-3.11.0 spec/spec_helper.rb
schema_dev-3.10.1 spec/spec_helper.rb
schema_dev-3.10.0 spec/spec_helper.rb
schema_dev-3.9.0 spec/spec_helper.rb