Sha256: 679a7239855305b597450a1713613cf4ae2da838c5943aef572c78e3a138216e
Contents?: true
Size: 914 Bytes
Versions: 19
Compression:
Stored size: 914 Bytes
Contents
# -*- Encoding: utf-8 -*- # # Copyright 2013 whiteleaf. All rights reserved. # require "tmpdir" require_relative "../lib/inventory" require_relative "../lib/novelsetting" describe NovelSetting do context "setting.ini 書き出し関係" do before do @tmpdir = Dir.mktmpdir @novel_setting = NovelSetting.new(@tmpdir, true, true) @inipath = File.join(@tmpdir, NovelSetting::INI_NAME) end after do FileUtils.remove_entry_secure @tmpdir end it "読み込んだ設定を setting.ini に書き出せるか" do @novel_setting.save_settings expect(File.exist?(@inipath)).to be_truthy end it "オリジナル設定も setting.ini に書きだされるか" do @novel_setting["original"] = "hoge" @novel_setting.save_settings lines = File.read(@inipath).split("\n") expect(lines.last).to eq 'original = "hoge"' end end end
Version data entries
19 entries across 19 versions & 1 rubygems