Sha256: df32ced5ea677f3b8ace0205cc8c3717356aedaff5717638a48f6ccdb1f636a2

Contents?: true

Size: 362 Bytes

Versions: 1

Compression:

Stored size: 362 Bytes

Contents

require 'rails'
module ConfigHelpers
  def with_config_file(hash, &block)
    #Silvermoon::Notifier.stub!(:config_file_path).and_return('spec/dummy/config/silvermoon.yml')
    hash = { :test => hash }
    File.open("#{Rails.root}/config/silvermoon.yml", 'w') do |f|
      f.write hash.to_yaml
    end

    Silvermoon::Notifier.reload_config!
    yield
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
silvermoon-0.1 spec/support/config_helpers.rb