 
 
   helpers
-    createApp: (settings = {}, options = {}) ->
+    createApp: (settings = {}, options = {}, context = {}) ->
       @app = Ext.create 'Rally.apps.kanban.KanbanApp',
         context: Ext.create('Rally.app.Context',
           initialValues:
-            project:
-              _ref: @projectRef
-              Name: 'Project 1'
-            workspace:
-              WorkspaceConfiguration:
-                DragDropRankingEnabled: if Ext.isDefined(options.DragDropRankingEnabled) then options.DragDropRankingEnabled else true
+            Ext.merge({
+              project:
+                _ref: @projectRef
+                Name: @projectName
+              workspace:
+                WorkspaceConfiguration:
+                  DragDropRankingEnabled: if Ext.isDefined(options.DragDropRankingEnabled) then options.DragDropRankingEnabled else true},
+              context)
         )
         settings: settings
         renderTo: options.renderTo || 'testDiv'

  it 'should show filter info when scoped to a specific project', ->
    projectScopeUp = true
    projectScopeDown = false
    @createApp(project: @projectRef, projectScopeUp: projectScopeUp, projectScopeDown: projectScopeDown).then =>
      filterInfo = @app.down('rallyfilterinfo')
      expect(filterInfo.getProjectName()).toBe @app.getContext().getProject().Name
      expect(filterInfo.getScopeUp()).toBe projectScopeUp

    @ajax.whenQuerying('defect').respondWith()

    @projectRef = Rally.environment.getContext().getProject()._ref
    @projectName = 'Project 1'

  afterEach ->
    Rally.test.destroyComponentsOfQuery 'kanbanapp'
