Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
brainfood
/
rivets
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
391add17
authored
2012-10-21 17:15:47 -0700
by
Michael Richards
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Update routine specs to access the binder's routine property where needed.
1 parent
185fb885
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
spec/rivets/routines.js
spec/rivets/routines.js
View file @
391add1
...
...
@@ -46,17 +46,17 @@ describe('Routines', function() {
describe
(
'value'
,
function
()
{
it
(
"sets the element's value"
,
function
()
{
rivets
.
routines
.
value
(
input
,
'pitchfork'
);
rivets
.
routines
.
value
.
routine
(
input
,
'pitchfork'
);
expect
(
input
.
value
).
toBe
(
'pitchfork'
);
});
it
(
"applies a default value to the element when the model doesn't contain it"
,
function
()
{
rivets
.
routines
.
value
(
input
,
undefined
);
rivets
.
routines
.
value
.
routine
(
input
,
undefined
);
expect
(
input
.
value
).
toBe
(
''
);
});
it
(
"sets the element's value to zero when a zero value is passed"
,
function
()
{
rivets
.
routines
.
value
(
input
,
0
);
rivets
.
routines
.
value
.
routine
(
input
,
0
);
expect
(
input
.
value
).
toBe
(
'0'
);
});
});
...
...
@@ -128,14 +128,14 @@ describe('Routines', function() {
describe
(
'checked'
,
function
()
{
describe
(
'with a truthy value'
,
function
()
{
it
(
'checks the element'
,
function
()
{
rivets
.
routines
.
checked
(
el
,
true
);
rivets
.
routines
.
checked
.
routine
(
el
,
true
);
expect
(
el
.
checked
).
toBe
(
true
);
});
});
describe
(
'with a falsey value'
,
function
()
{
it
(
'unchecks the element'
,
function
()
{
rivets
.
routines
.
checked
(
el
,
false
);
rivets
.
routines
.
checked
.
routine
(
el
,
false
);
expect
(
el
.
checked
).
toBe
(
false
);
});
});
...
...
@@ -144,14 +144,14 @@ describe('Routines', function() {
describe
(
'unchecked'
,
function
()
{
describe
(
'with a truthy value'
,
function
()
{
it
(
'unchecks the element'
,
function
()
{
rivets
.
routines
.
unchecked
(
el
,
true
);
rivets
.
routines
.
unchecked
.
routine
(
el
,
true
);
expect
(
el
.
checked
).
toBe
(
false
);
});
});
describe
(
'with a falsey value'
,
function
()
{
it
(
'checks the element'
,
function
()
{
rivets
.
routines
.
unchecked
(
el
,
false
);
rivets
.
routines
.
unchecked
.
routine
(
el
,
false
);
expect
(
el
.
checked
).
toBe
(
true
);
});
});
...
...
Please
register
or
sign in
to post a comment