Better state management in spec and add some tests for MangaDex::Queue

This commit is contained in:
Alex Ling
2020-03-03 18:34:39 +00:00
parent 9ffe896705
commit 1abdac2fdd
4 changed files with 183 additions and 56 deletions
+4 -4
View File
@@ -2,11 +2,11 @@ require "./spec_helper"
describe Config do
it "creates config if it does not exist" do
tempfile = File.tempfile "mango-test-config"
config = Config.load tempfile.path
File.exists?(tempfile.path).should be_true
tempfile.delete
with_default_config do |config, logger, path|
File.exists?(path).should be_true
end
end
it "correctly loads config" do
config = Config.load "spec/asset/test-config.yml"
config.port.should eq 3000