projects
/
tech-radar.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2c6e76e
)
var clean up on tests
author
Bruno Trecenti
<btrecent@thoughtworks.com>
Tue, 25 Feb 2014 14:21:47 +0000
(11:21 -0300)
committer
Bruno Trecenti
<btrecent@thoughtworks.com>
Tue, 25 Feb 2014 14:21:47 +0000
(11:21 -0300)
test/graphing/radar-spec.js
patch
|
blob
|
history
diff --git
a/test/graphing/radar-spec.js
b/test/graphing/radar-spec.js
index
5c7d3b5
..
02c3e29
100644
(file)
--- a/
test/graphing/radar-spec.js
+++ b/
test/graphing/radar-spec.js
@@
-11,10
+11,11
@@
describe('tr.graphing.Radar', function () {
});
it('sets the size', function () {
});
it('sets the size', function () {
- var svg = buildSvg();
+ var svg, radarGraph;
+ svg = buildSvg();
spyOn(svg, 'attr').andReturn(svg);
spyOn(svg, 'attr').andReturn(svg);
-
var
radarGraph = new tr.graphing.Radar(svg, 500, radar);
+ radarGraph = new tr.graphing.Radar(svg, 500, radar);
expect(svg.attr).toHaveBeenCalledWith('width', 500);
expect(svg.attr).toHaveBeenCalledWith('height', 500);
expect(svg.attr).toHaveBeenCalledWith('width', 500);
expect(svg.attr).toHaveBeenCalledWith('height', 500);
@@
-22,11
+23,13
@@
describe('tr.graphing.Radar', function () {
describe('lines', function () {
it('plots a vertical line in the center', function () {
describe('lines', function () {
it('plots a vertical line in the center', function () {
- var svg = buildSvg();
+ var svg, radarGraph;
+
+ svg = buildSvg();
spyOn(svg, 'append').andReturn(svg);
spyOn(svg, 'attr').andReturn(svg);
spyOn(svg, 'append').andReturn(svg);
spyOn(svg, 'attr').andReturn(svg);
-
var
radarGraph = new tr.graphing.Radar(svg, 500, radar);
+ radarGraph = new tr.graphing.Radar(svg, 500, radar);
radarGraph.plot();
radarGraph.plot();
@@
-39,11
+42,13
@@
describe('tr.graphing.Radar', function () {
});
it('plots a horizontal line in the center', function () {
});
it('plots a horizontal line in the center', function () {
- var svg = buildSvg();
+ var svg, radarGraph;
+
+ svg = buildSvg();
spyOn(svg, 'append').andReturn(svg);
spyOn(svg, 'attr').andReturn(svg);
spyOn(svg, 'append').andReturn(svg);
spyOn(svg, 'attr').andReturn(svg);
-
var
radarGraph = new tr.graphing.Radar(svg, 500, radar);
+ radarGraph = new tr.graphing.Radar(svg, 500, radar);
radarGraph.plot();
radarGraph.plot();