emberjs/ember.js — pull request #935 by joliss (2012-06-02 18:47:37+00:00)
Title: Location: Add 'none' location, make 'hash' the default

* Add NoneLocation

I am using this in my own test suite, and it's been working well. I'm
not adding unit tests here, since the logic is trivial, and it will get
exercised by many other tests.

* Instantiate Ember.Location implementation from Router

It was instantiated in App.startRouting before, instead of Router.init.

Now we can use string locations when testing the Router in isolation,
without requiring `app.startRouting` to be called.

* Clean up location stubbing in routable_test

* Use 'hash' as default location implementation on Router

Even when pushState is implemented later, 'hash' will be a reasonable
default, since pushState URL manipulation requires server-side support.

* Router.location cannot be null or undefined

* Avoid using HashLocation in tests

It interacts with the browser and might be a source of brittleness.

-------------------

I'm sending a batch of commits because some of the earlier cleanup is required for the test suite to still pass for later tests, so it wasn't possible to send them separately.