Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #3 from mikeedwards/test-fixes

Fixes for running brunch test
  • Loading branch information...
commit 852ca3c9fbe1ba40362c5423a3fe0e4ca525933b 2 parents 0d55e3d + 4f9c7c3
@elving authored
View
3  app/views/app_view.coffee
@@ -5,5 +5,6 @@ module.exports = class AppView extends View
el: 'body.application'
initialize: ->
- @router = Hipster.Routers.AppRouter = new AppRouter()
+ @router = new AppRouter()
+ Hipster?.Routers?.AppRouter = @router
View
2  config.coffee
@@ -12,6 +12,8 @@ exports.config =
joinTo:
'javascripts/app.js': /^app/
'javascripts/vendor.js': /^vendor/
+ 'test/javascripts/test.js': /^test(\/|\\)(?!vendor)/
+ 'test/javascripts/test-vendor.js': /^test(\/|\\)(?=vendor)/
order:
# Files in `vendor` directories are compiled before other files
# even if they aren't specified in order.
View
2  generators/model_test/generator.json
@@ -1,7 +1,7 @@
{
"files": [{
"from": "model_test.coffee.hbs",
- "to": "test/models/{{name}}.coffee"
+ "to": "test/models/{{name}}_test.coffee"
}],
"dependencies": []
}
View
36 generators/module/generator.json
@@ -1,21 +1,19 @@
{
- "files": [
- {
- "from": "model.coffee.hbs",
- "to": "app/models/{{name}}.coffee"
- },
- {
- "from": "view.coffee.hbs",
- "to": "app/views/{{name}}.coffee"
- },
- {
- "from": "template.hbs.hbs",
- "to": "app/views/templates/{{name}}.hbs"
- },
- {
- "from": "style.styl.hbs",
- "to": "app/views/styles/_{{name}}.styl"
- }
- ],
- "dependencies": []
+ "files": [{
+ "from": "view.coffee.hbs",
+ "to": "app/views/{{name}}.coffee"
+ }],
+ "dependencies": [{
+ "name": "model",
+ "params": "{{name}}"
+ }, {
+ "name": "view_test",
+ "params": "{{name}}"
+ }, {
+ "name": "style",
+ "params": "{{name}}"
+ }, {
+ "name": "template",
+ "params": "{{name}}"
+ }]
}
View
1  generators/module/model.coffee.hbs
@@ -1 +0,0 @@
-module.exports = class {{#camelize}}{{name}}{{/camelize}}Model extends Backbone.Model
View
3  generators/module/style.styl.hbs
@@ -1,3 +0,0 @@
-.{{name}}
- // {{#camelize}}{{name}}{{/camelize}} Module
-
View
4 generators/module/template.hbs.hbs
@@ -1,4 +0,0 @@
-<section class="{{name}}">
-
-</section>
-<!-- .{{name}} -->
View
2  generators/view_test/generator.json
@@ -2,7 +2,7 @@
"files": [
{
"from": "view_test.coffee.hbs",
- "to": "test/views/{{name}}.coffee"
+ "to": "test/views/{{name}}_test.coffee"
}
],
"dependencies": []
View
4 test/test-helpers.coffee
@@ -0,0 +1,4 @@
+expect = require 'expect.js'
+
+module.exports =
+ expect: expect
View
8 test/views/app_view_test.coffee
@@ -0,0 +1,8 @@
+AppView = require 'views/app_view'
+
+describe 'AppView', ->
+ beforeEach ->
+ @view = new AppView()
+
+ it "should exist", ->
+ expect( @view ).to.be.ok()
Please sign in to comment.
Something went wrong with that request. Please try again.