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
667aee5a
authored
2012-07-18 00:29:55 -0700
by
Michael Richards
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Add specs for the enabled and disabled binding routines.
1 parent
a0fe3c7e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
0 deletions
spec/rivets.js
spec/rivets.js
View file @
667aee5
...
...
@@ -105,6 +105,38 @@ describe('Rivets', function() {
});
});
});
describe
(
'enabled'
,
function
()
{
describe
(
'with a truthy value'
,
function
()
{
it
(
'enables the element'
,
function
()
{
rivets
.
routines
.
enabled
(
el
,
true
);
expect
(
el
.
disabled
).
toBe
(
false
);
});
});
describe
(
'with a falsey value'
,
function
()
{
it
(
'disables the element'
,
function
()
{
rivets
.
routines
.
enabled
(
el
,
false
);
expect
(
el
.
disabled
).
toBe
(
true
);
});
});
});
describe
(
'disabled'
,
function
()
{
describe
(
'with a truthy value'
,
function
()
{
it
(
'disables the element'
,
function
()
{
rivets
.
routines
.
disabled
(
el
,
true
);
expect
(
el
.
disabled
).
toBe
(
true
);
});
});
describe
(
'with a falsey value'
,
function
()
{
it
(
'enables the element'
,
function
()
{
rivets
.
routines
.
disabled
(
el
,
false
);
expect
(
el
.
disabled
).
toBe
(
false
);
});
});
});
});
describe
(
'Binds'
,
function
()
{
...
...
Please
register
or
sign in
to post a comment