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
225578d0
authored
2012-08-10 16:04:30 -0700
by
Michael Richards
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Add isolated spec for calling binding.set() on an iteration binding.
1 parent
238649cb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
spec/rivets/binding.js
spec/rivets/binding.js
View file @
225578d
...
...
@@ -116,6 +116,19 @@ describe('Rivets.Binding', function() {
expect
(
binding
.
routine
).
toHaveBeenCalledWith
(
el
,
funcb
,
funca
);
});
});
describe
(
'on an iteration binding'
,
function
(){
beforeEach
(
function
(){
binding
.
options
.
special
=
'iteration'
;
});
it
(
'performs the binding routine with the supplied collection and binding'
,
function
()
{
spyOn
(
binding
,
'routine'
);
array
=
[{
name
:
'a'
},
{
name
:
'b'
}];
binding
.
set
(
array
);
expect
(
binding
.
routine
).
toHaveBeenCalledWith
(
el
,
array
,
binding
);
});
});
});
describe
(
'publish()'
,
function
()
{
...
...
Please
register
or
sign in
to post a comment