Sha256: 06935763482df7b425233e1dec10d9128b6709b7cf0803ef5921a2b5db23f30a

Contents?: true

Size: 1.02 KB

Versions: 25

Compression:

Stored size: 1.02 KB

Contents

module Serverspec
  module Helper
    module Configuration
      def subject
        build_configurations
        super
      end

      # You can create a set of configurations provided to all specs in your spec_helper:
      #
      #   RSpec.configure { |c| c.pre_command = "source ~/.zshrc" }
      #
      # Any configurations you provide with `let(:option_name)` in a spec will
      # automatically be merged on top of the configurations.
      #
      # @example
      #
      #   describe 'Gem' do
      #     let(:pre_command) { "source ~/.zshrc" }
      #
      #     %w(pry awesome_print bundler).each do |p|
      #       describe package(p) do
      #         it { should be_installed.by('gem') }
      #       end
      #     end
      #   end
      def build_configurations
        Serverspec::Configuration.defaults.keys.each do |c|
          value = self.respond_to?(c.to_sym) ?
          self.send(c) : RSpec.configuration.send(c)
          Serverspec::Configuration.send(:"#{c}=", value)
        end
      end
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
serverspec-0.6.16 lib/serverspec/helper/configuration.rb
serverspec-0.6.15 lib/serverspec/helper/configuration.rb
serverspec-0.6.13 lib/serverspec/helper/configuration.rb
serverspec-0.6.12 lib/serverspec/helper/configuration.rb
serverspec-0.6.11 lib/serverspec/helper/configuration.rb
serverspec-0.6.10 lib/serverspec/helper/configuration.rb
serverspec-0.6.9 lib/serverspec/helper/configuration.rb
serverspec-0.6.8 lib/serverspec/helper/configuration.rb
serverspec-0.6.7 lib/serverspec/helper/configuration.rb
serverspec-0.6.6 lib/serverspec/helper/configuration.rb
serverspec-0.6.5 lib/serverspec/helper/configuration.rb
serverspec-0.6.4 lib/serverspec/helper/configuration.rb
serverspec-0.6.3 lib/serverspec/helper/configuration.rb
serverspec-0.6.2 lib/serverspec/helper/configuration.rb
serverspec-0.6.1 lib/serverspec/helper/configuration.rb
serverspec-0.6.0 lib/serverspec/helper/configuration.rb
serverspec-0.5.8 lib/serverspec/helper/configuration.rb
serverspec-0.5.7 lib/serverspec/helper/configuration.rb
serverspec-0.5.6 lib/serverspec/helper/configuration.rb
serverspec-0.5.5 lib/serverspec/helper/configuration.rb