summaryrefslogtreecommitdiff
path: root/spec/javascripts
diff options
context:
space:
mode:
authormo k <mo@mokhan.ca>2012-09-18 14:22:12 -0600
committermo k <mo@mokhan.ca>2012-09-18 14:22:12 -0600
commitbddf8eb82fc70b6fde1beb2dd57b18580a3c36c2 (patch)
tree12bf2c06ce0cdbded9f33f5b278ca7825d7ad545 /spec/javascripts
parent657e20a5b0fc342b16eec28e4d796e66b86b1927 (diff)
start to build the new tutorial presenter.
Diffstat (limited to 'spec/javascripts')
-rw-r--r--spec/javascripts/presenters/new_tutorial_presenter_spec.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/javascripts/presenters/new_tutorial_presenter_spec.js b/spec/javascripts/presenters/new_tutorial_presenter_spec.js
new file mode 100644
index 00000000..f98cf418
--- /dev/null
+++ b/spec/javascripts/presenters/new_tutorial_presenter_spec.js
@@ -0,0 +1,17 @@
+describe ("NewTutorialPresenter", function() {
+ beforeEach (function() {
+ view = {add_tag:null};
+ sut = new NewTutorialPresenter(view);
+ });
+ var sut;
+ var view;
+ describe ("when a new tag is added", function() {
+ it ("should add the new tag to the list of tags", function() {
+ expect(view.add_tag).toHaveBeenCalledWith('<li><a href="#" class="label">blah</a></li>');
+ });
+ beforeEach (function() {
+ spyOn(view, 'add_tag');
+ sut.add_tag('blah');
+ });
+ });
+});