Sha256: 35a8677a31c89e6f5ba2378bd689f3a01af5a6a3333968430720b468b4e8c342
Contents?: true
Size: 769 Bytes
Versions: 18
Compression:
Stored size: 769 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/spec_helper') require 'fileutils' class ConfigTest include Junkie::Config attr_reader :config DEFAULT_CONFIG = { refresh: 5, numbers: [1, 2, 3, 4, 5, 6, 7, 8, 9], } def initialize() @config = Junkie::Config.get_config(self) end end describe ConfigTest do before do @file = '/tmp/testtest.yml' stub_const("Junkie::CONFIG_FILE", @file) end after(:each) do FileUtils.rm(@file) if File.file? @file end it "should stub out the Config File" do expect(Junkie::CONFIG_FILE).to eq('/tmp/testtest.yml') end it "should return the default if there are no changes made" do test = ConfigTest.new expect(test.config).to eq ConfigTest::DEFAULT_CONFIG end end
Version data entries
18 entries across 18 versions & 1 rubygems