1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-07 22:16:10 +08:00

Fix ImportTest.TestOsuGameBase having null ruleset

This commit is contained in:
Salman Ahmed 2024-02-11 11:16:54 +03:00
parent 633d85431b
commit bc2b705063

View File

@ -2,6 +2,7 @@
// See the LICENCE file in the repository root for full licence text.
using System;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using NUnit.Framework;
@ -64,6 +65,10 @@ namespace osu.Game.Tests
// Beatmap must be imported before the collection manager is loaded.
if (withBeatmap)
BeatmapManager.Import(TestResources.GetTestBeatmapForImport()).WaitSafely();
// the logic for setting the initial ruleset exists in OsuGame rather than OsuGameBase.
// the ruleset bindable is not meant to be nullable, so assign any ruleset in here.
Ruleset.Value = RulesetStore.AvailableRulesets.First();
}
}
}