Sha256: d9eb76455e052266e968bb4be0e0427f319c14b13994ee77ea0e625b85c07036

Contents?: true

Size: 532 Bytes

Versions: 13

Compression:

Stored size: 532 Bytes

Contents

require 'yaml'

module NSISam
  module Test
    module Helpers
      def integration_options
        YAML::load(File.open(config_file)).symbolize_keys if integrating?
      end
      
      def integrating?
        ENV['NSI_SAM_INTEGRATION'] && config_file_exists?
      end
      
      protected
      
      def config_file_exists?
        File.exists?(config_file)
      end
      
      def config_file
        File.expand_path(File.join(File.dirname(__FILE__), '..', 
          'integration.yml'))
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
nsisam-0.7.7 spec/support/integration.rb
nsisam-0.7.6 spec/support/integration.rb
nsisam-0.7.5 spec/support/integration.rb
nsisam-0.7.4 spec/support/integration.rb
nsisam-0.7.3 spec/support/integration.rb
nsisam-0.7.2 spec/support/integration.rb
nsisam-0.7.1 spec/support/integration.rb
nsisam-0.7.0 spec/support/integration.rb
nsisam-0.6.4 spec/support/integration.rb
nsisam-0.6.3 spec/support/integration.rb
nsisam-0.6.2 spec/support/integration.rb
nsisam-0.6.1 spec/support/integration.rb
nsisam-0.6.0 spec/support/integration.rb