Flatten spec files, make them seem cleaner.

This commit is contained in:
Cheng Zhao 2013-12-06 22:23:02 +08:00
parent b431e96f9d
commit 2c672052e6
22 changed files with 155 additions and 151 deletions

25
spec/api-app-spec.coffee Normal file
View file

@ -0,0 +1,25 @@
assert = require 'assert'
app = require('remote').require 'app'
describe 'app module', ->
describe 'app.getVersion()', ->
it 'returns the version field of package.json', ->
assert.equal app.getVersion(), '0.1.0'
describe 'app.setVersion(version)', ->
it 'overrides the version', ->
assert.equal app.getVersion(), '0.1.0'
app.setVersion 'test-version'
assert.equal app.getVersion(), 'test-version'
app.setVersion '0.1.0'
describe 'app.getName()', ->
it 'returns the name field of package.json', ->
assert.equal app.getName(), 'atom-shell-default-app'
describe 'app.setName(name)', ->
it 'overrides the name', ->
assert.equal app.getName(), 'atom-shell-default-app'
app.setName 'test-name'
assert.equal app.getName(), 'test-name'
app.setName 'atom-shell-default-app'