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
a0fe3c7e
authored
2012-07-18 00:29:19 -0700
by
Michael Richards
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Add specs for the show and hide binding routines.
1 parent
064db165
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
0 deletions
spec/rivets.js
spec/rivets.js
View file @
a0fe3c7
...
...
@@ -73,6 +73,38 @@ describe('Rivets', function() {
expect
(
input
.
value
).
toBe
(
'pitchfork'
);
});
});
describe
(
'show'
,
function
()
{
describe
(
'with a truthy value'
,
function
()
{
it
(
'shows the element'
,
function
()
{
rivets
.
routines
.
show
(
el
,
true
);
expect
(
el
.
style
.
display
).
toBe
(
''
);
});
});
describe
(
'with a falsey value'
,
function
()
{
it
(
'hides the element'
,
function
()
{
rivets
.
routines
.
show
(
el
,
false
);
expect
(
el
.
style
.
display
).
toBe
(
'none'
);
});
});
});
describe
(
'hide'
,
function
()
{
describe
(
'with a truthy value'
,
function
()
{
it
(
'hides the element'
,
function
()
{
rivets
.
routines
.
hide
(
el
,
true
);
expect
(
el
.
style
.
display
).
toBe
(
'none'
);
});
});
describe
(
'with a falsey value'
,
function
()
{
it
(
'shows the element'
,
function
()
{
rivets
.
routines
.
hide
(
el
,
false
);
expect
(
el
.
style
.
display
).
toBe
(
''
);
});
});
});
});
describe
(
'Binds'
,
function
()
{
...
...
Please
register
or
sign in
to post a comment