Because The Scripts
class uses the static System.Web.HttpContext.Current
instance, this is near impossible to mock.
So i ended up creating a wrapper interface for Scripts, then mocked that out in my unit tests.
E.g
var bundleUrl = Scripts ?? new ScriptsWrapper()..Url("~/Scripts/MyBundle");
Unit Test:
controller.Scripts = new Mock<IScripts>().Object;