Skip to content

Commit

Permalink
Fix tests and keywords
Browse files Browse the repository at this point in the history
  • Loading branch information
matthijsgroen committed Nov 12, 2015
1 parent 623dd4e commit 22d5ec8
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 19 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
@@ -1,7 +1,8 @@
language: node_js
node_js:
- 0.8
- 0.12
branches:
only:
- master
sudo: false

8 changes: 5 additions & 3 deletions chai-backbone.coffee
Expand Up @@ -87,10 +87,12 @@
consideredRouter._bindRoutes() for consideredRouter in options.considering

# manually set the root option to prevent calling Backbone.history.start() which is global
Backbone.history.options =
root: '/'

Backbone.history.root = '/'
route = flag(this, 'object')

Backbone.history.location =
pathname: '/'

# fire our route to test
Backbone.history.loadUrl route

Expand Down
10 changes: 5 additions & 5 deletions chai-backbone.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -2,8 +2,8 @@
"author": "Matthijs Groen <matthijs.groen@gmail.com>",
"name": "chai-backbone",
"description": "Backbone assertions for the Chai assertion library",
"keywords": [ "test", "assertion", "assert", "testing", "backbone" ],
"version": "0.9.2",
"keywords": [ "test", "assertion", "assert", "testing", "backbone", "chai-plugin", "browser", "vendor", "dom" ],
"version": "0.9.3",
"repository": {
"type": "git",
"url": "https://github.com/matthijsgroen/chai-backbone"
Expand Down
2 changes: 1 addition & 1 deletion test.sh
@@ -1,3 +1,3 @@
#!/bin/bash
coffee -c -o . . && coffee -c -o test/ test/ && xdg-open test/browser/index.html
coffee -c -o . . && coffee -c -o test/ test/ && open test/browser/index.html

1 change: 0 additions & 1 deletion test/browser/index.html
Expand Up @@ -10,7 +10,6 @@
<script>mocha.setup('bdd')</script>
<script src="../../node_modules/chai/chai.js"></script>
<script src="http://sinonjs.org/releases/sinon-1.5.2.js"></script>
<script src="https://raw.github.com/cujojs/when/master/when.js"></script>
<script src="../../node_modules/chai-changes/chai-changes.js"></script>
<script src="../../chai-backbone.js"></script>
<script src="setup.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion test/chai-backbone_spec.coffee
Expand Up @@ -60,7 +60,7 @@ describe 'Chai-Backbone matchers', ->
"route2/argVal".should.route.to router, 'routeWithArg', arguments: ['argVal']
expect(->
"route2/ere".should.route.to router, 'routeWithArg', arguments: ['argVal']
).to.throw 'expected `routeWithArg` to be called with [ \'argVal\' ], but was called with [ \'ere\' ] instead'
).to.throw 'expected `routeWithArg` to be called with [ \'argVal\' ], but was called with [ \'ere\', null ] instead'

it 'leaves the `to` keyword working properly', ->
expect('1').to.be.equal '1'
Expand Down
6 changes: 2 additions & 4 deletions test/chai-backbone_spec.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/mocha.opts
@@ -1,3 +1,3 @@
--reporter spec
--require test/setup
--compilers coffee:coffee-script
--compilers coffee:coffee-script/register

0 comments on commit 22d5ec8

Please sign in to comment.