spec/javascripts/jax/mvc/route_set_spec.js in jax-2.0.5 vs spec/javascripts/jax/mvc/route_set_spec.js in jax-2.0.6
- old
+ new
@@ -3,9 +3,20 @@
var controller_class = Jax.Controller.create({index: function() { }});
Jax.views.push("generic/index", function() { });
beforeEach(function() { map = Jax.routes; map.clear(); });
+ describe("when a CamelCase controller name is given", function() {
+ beforeEach(function() {
+ controller_class = Jax.Controller.create("TestBreaker", {index: function() { }});
+ });
+
+ it("should recognize underscored route names", function() {
+ var route = map.recognizeRoute("test_breaker");
+ expect(route.controller).toEqual(controller_class);
+ });
+ });
+
describe("when a controller name is given during controller definition", function() {
beforeEach(function() {
controller_class = Jax.Controller.create("welcome", {index: function() { }});
});