I have a Marionette project similar to the setup described at http://www.backbonerails.com/
I use Rails, Coffeescript and Jasmine / Sinon for specification.
I have problems testing modules separately. One example is a router:
@MyApp.module "DashboardApp", (DashboardApp, App, Backbone, Marionette, $, _) ->
class DashboardApp.Router extends Marionette.AppRouter
appRoutes:
"dashboard" : "showDashboard"
API =
showDashboard: ->
DashboardApp.Show.Controller.showDashboard()
App.addInitializer ->
new DashboardApp.Router
controller: API
I am not sure how to test this separately from the application (window.MyApp). I would basically like to run the "#dashboard" route and claim that showDashboard is being called without being allowed to participate in this application. We use the Rails asset pipeline (so there is no RequireJS), so all JS files are loaded at startup. What I think will work well is to mock the App object used in this module somehow, but I'm open to any solution.
Another problem I encountered is testing the Marionette and reqres commands, for example, I have
App.execute("navigate:root")
, , , , , Marionette.Application . , , .
, , (, /) Marionette.Application. , , Wreqr, ..