Sha256: 404e46a34f88cb7fa6ae0b62575d47dddc59bd7cd8fc23a7f48ce5fe7abbe425

Contents?: true

Size: 944 Bytes

Versions: 3

Compression:

Stored size: 944 Bytes

Contents

require "specinfra/version"
require "specinfra/helper"
require "specinfra/backend"
require "specinfra/command"
require "specinfra/configuration"

include SpecInfra

module SpecInfra
  class << self
    def configuration
      SpecInfra::Configuration
    end
  end
end

if defined?(RSpec)
  RSpec.configure do |c|
    c.include(SpecInfra::Helper::Configuration)
    c.add_setting :os,            :default => nil
    c.add_setting :host,          :default => nil
    c.add_setting :ssh,           :default => nil
    c.add_setting :sudo_password, :default => nil
    c.add_setting :winrm,         :default => nil
    SpecInfra.configuration.defaults.each { |k, v| c.add_setting k, :default => v }
    c.before :each do
      if respond_to?(:backend) && backend.respond_to?(:set_example)
        example = RSpec.respond_to?(:current_example) ? RSpec.current_example : self.example
        backend.set_example(example)
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
specinfra-0.3.0 lib/specinfra.rb
specinfra-0.2.1 lib/specinfra.rb
specinfra-0.2.0 lib/specinfra.rb