Sha256: 325adc5c9bc53ba9038bb76c1e328712ebda8d42bbf0009692d70fd9d179b7c3

Contents?: true

Size: 673 Bytes

Versions: 3

Compression:

Stored size: 673 Bytes

Contents

require_relative '../make_db'
require 'wlog/domain/sys_config'

include Wlog

describe SysConfig do

  db_name = "default"
  db_path = standard_db_path(db_name)

  before(:all) do
    make_testing_db(db_name)
    @sys = SysConfig.new
  end

  after(:all) do
    FileUtils.rm db_path
  end

  it "should store last focus" do
    @sys.last_focus = "something_there"
  end

  it "should load last focus" do
    expect(@sys.last_focus).to eq("something_there")
  end

  it "should store once, and on next store overwrite last focus" do
    @sys.last_focus = "something_now"
    @sys.last_focus = "something_then"
    expect(@sys.last_focus).to eq("something_then")
  end


end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
wlog-1.1.7 spec/domain/sys_config_spec.rb
wlog-1.1.6 spec/domain/sys_config_spec.rb
wlog-1.1.5 spec/domain/sys_config_spec.rb