summaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
Diffstat (limited to 'spec')
-rwxr-xr-xspec/spec/number.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/spec/spec/number.js b/spec/spec/number.js
index 986338b..de00481 100755
--- a/spec/spec/number.js
+++ b/spec/spec/number.js
@@ -98,16 +98,17 @@ describe('Number', function() {
beforeEach(function() {
number = number.plus(4)
})
- it('returns itself', function() {
- expect(number.to('em')).toBe(number)
+ it('returns a new instance', function() {
+ expect(number.to('em')).not.toBe(number)
+ expect(number.to('em') instanceof SVG.Number).toBeTruthy()
})
it('changes the unit value', function() {
- number.to('%')
+ number = number.to('%')
expect(number.unit).toBe('%')
})
it('changes the output value', function() {
var oldNumber = number.valueOf()
- number.to('%')
+ number = number.to('%')
expect(number.toString()).toBe('400%')
})
})