Sha256: a9c6617ba0067a9ed2fefc38c4bde9b5f01c21132e154cb6485413702b40a521

Contents?: true

Size: 379 Bytes

Versions: 2

Compression:

Stored size: 379 Bytes

Contents

module TestConfiguration
  include TemporaryFiles

  def stub_config(config, &block)
    Nesta::Config.stub(:yaml_exists?, true) do
      Nesta::Config.stub(:yaml_conf, config) do
        yield
      end
    end
  end

  def temp_content
    { 'content' => temp_path('content') }
  end

  def with_temp_content_directory(&block)
    stub_config(temp_content) { yield }
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
nesta-0.13.0 test/support/test_configuration.rb
nesta-0.12.0 test/support/test_configuration.rb