Skip to content

Commit

Permalink
changing language describing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rmurphey committed Apr 11, 2012
1 parent 984e664 commit c46ea15
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 16 deletions.
12 changes: 6 additions & 6 deletions tests/app/arrays.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,31 +12,31 @@ define([ 'use!underscore' ], function(_) {
fn = function() { };
});

it("should be possible to determine the location of an item in an array", function() {
it("you should be able to determine the location of an item in an array", function() {
// define a function for fn so that the following will pass
expect(fn(a, 3)).to.be(2);
});

it("should be possible to add the values of an array", function() {
it("you should be able to add the values of an array", function() {
// define a function for fn so that the following will pass
expect(fn(a)).to.be(10);
});

it("should be possible to remove an item from an array", function() {
it("you should be able to remove an item from an array", function() {
// define a function for fn so that the following will pass
var result = fn(a);
expect(result).to.have.length(3);
expect(result.join(' ')).to.be('1 3 4');
});

it("should be possible to add an item to the end of an array", function() {
it("you should be able to add an item to the end of an array", function() {
// define a function for fn so that the following will pass
var result = fn(a, 10);
expect(result).to.have.length(5);
expect(result[result.length - 1]).to.be(10);
});

it("should be possible to create an array from two arrays", function() {
it("you should be able to create an array from two arrays", function() {
// define a function for fn so that the following will pass
var c = [ 'a', 'b', 'c' ],
result = fn(a, c);
Expand All @@ -45,7 +45,7 @@ define([ 'use!underscore' ], function(_) {
expect(result.join(' ')).to.be('1 2 3 4 a b c');
});

it("should be possible to add an item anywhere in an array", function() {
it("you should be able to add an item anywhere in an array", function() {
// define a function for fn so that the following will pass
var result = fn(a, 'z', 2);

Expand Down
4 changes: 2 additions & 2 deletions tests/app/async.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ define([ 'jquery', 'use!underscore' ], function($, _) {

});

it("should return a promise that resolves true", function(done) {
it("you should understand how to uses 'promises'", function(done) {
var flag = false;

fn = function() {
Expand All @@ -20,7 +20,7 @@ define([ 'jquery', 'use!underscore' ], function($, _) {
});
});

it("should receive and manipulate data from the server", function(done) {
it("you should be able to receive data from the server and manipulate it", function(done) {
var peopleArray,
url = '/data/testdata.json',

Expand Down
8 changes: 4 additions & 4 deletions tests/app/functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ define([ 'use!underscore' ], function(_) {
},
fn = function() {};

it("should be possible to use an array of arguments to call a function", function() {
it("you should be able to use an array as arguments when calling a function", function() {
var result = fn([ 'Hello', 'Ellie', '!' ]);
expect(result).to.be('Hello, Ellie!');
});

it("should be possible to change the context in which a function is called", function() {
it("you should be able to change the context in which a function is called", function() {
var speak = function() {
sayIt(this.greeting, this.name, '!!!');
},
Expand All @@ -24,12 +24,12 @@ define([ 'use!underscore' ], function(_) {
expect(fn()).to.be('Hello, Rebecca!');
});

it("should be possible to return a function from a function", function() {
it("you should be able to return a function from a function", function() {
// define a function for fn so that the following will pass
expect(fn('Hello')('world')).to.be('Hello, world');
});

it("should be possible to declare a 'partial' function", function() {
it("you should be able to create a 'partial' function", function() {
// define a function for fn so that the following will pass
var partial = fn(sayIt, 'Hello', 'Ellie');
expect(partial('!!!')).to.be('Hello, Ellie!!!');
Expand Down
4 changes: 2 additions & 2 deletions tests/app/objects.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ define([ 'use!underscore' ], function(_) {
};
});

it("should be able to alter the context in which a method runs", function() {
it("you should be able to alter the context in which a method runs", function() {
// define a function for fn so that the following will pass
expect(fn()).to.be('Yo, Rebecca!');
});

it("should be able to alter multiple objects at once", function() {
it("you should be able to alter multiple objects at once", function() {
// define a function for fn so that the following will pass
var obj1 = new C('Rebecca'),
obj2 = new C('Melissa'),
Expand Down
4 changes: 2 additions & 2 deletions tests/app/views.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ define([ 'use!backbone', 'use!underscore', 'jquery' ], function(Backbone, _, $)
}
});

it("should render a view from a template", function() {
it("you should be able to render a view using a template", function() {
var MyView = Backbone.View.extend({
template : tpl,
render : function() {
Expand All @@ -29,7 +29,7 @@ define([ 'use!backbone', 'use!underscore', 'jquery' ], function(Backbone, _, $)
expect(document.getElementById('my-view').innerHTML).to.contain('Hello, world');
});

it("should update the view when the model changes", function() {
it("you should be able to update the view when the model changes", function() {
var MyView = Backbone.View.extend({
// fill in the code required in the initialize and render methods
// to make the tests below pass
Expand Down

0 comments on commit c46ea15

Please sign in to comment.