File: state.rb

package info (click to toggle)
ruby-localhost 1.7.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 232 kB
  • sloc: ruby: 579; makefile: 4
file content (22 lines) | stat: -rw-r--r-- 490 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# frozen_string_literal: true

# Released under the MIT License.
# Copyright, 2025, by Samuel Williams.

require "localhost/authority"

require "sus/fixtures/async/reactor_context"
require "io/endpoint/ssl_endpoint"

require "fileutils"
require "tempfile"

describe Localhost::State do
	with ".path" do
		it "uses XDG_STATE_HOME" do
			env = {"XDG_STATE_HOME" => "/tmp/state"}
			
			expect(Localhost::State.path(env)).to be == File.expand_path("localhost.rb", "/tmp/state")
		end
	end
end