From 8e3db3aebee171a558009801139a9227ffc1d86a Mon Sep 17 00:00:00 2001 From: Dennis Collinson Date: Sun, 11 Dec 2011 14:28:43 -0800 Subject: [PATCH] make jasmine view tests work, load templates, party --- app/views/layouts/application.html.haml | 3 +- app/views/templates/stream_element.ujs | 62 +++++++++---------- .../app/views/{comment.js => comment_view.js} | 0 ...ment-stream.js => commment_stream_view.js} | 0 .../app/views/{post.js => post_view.js} | 0 .../app/views/{stream.js => stream_view.js} | 0 spec/controllers/multis_controller_spec.rb | 2 +- spec/jasmine_fixtures/template_spec.rb | 9 +++ .../javascripts/app/views/stream_view_spec.js | 17 ++--- spec/support/fixture_generation.rb | 7 ++- 10 files changed, 57 insertions(+), 43 deletions(-) rename public/javascripts/app/views/{comment.js => comment_view.js} (100%) rename public/javascripts/app/views/{comment-stream.js => commment_stream_view.js} (100%) rename public/javascripts/app/views/{post.js => post_view.js} (100%) rename public/javascripts/app/views/{stream.js => stream_view.js} (100%) create mode 100644 spec/jasmine_fixtures/template_spec.rb diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index 52bf259fe..2c4d51620 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -74,8 +74,7 @@ %header{:class=>('landing' unless current_user)} = render 'layouts/header' - - if @backbone - = render 'templates/templates' + = render 'templates/templates' .container{:style=> "#{yield(:break_the_mold)}"} - if @aspsect == :getting_started || @page == :logged_out diff --git a/app/views/templates/stream_element.ujs b/app/views/templates/stream_element.ujs index 6b7ea2f6e..9b0c203db 100644 --- a/app/views/templates/stream_element.ujs +++ b/app/views/templates/stream_element.ujs @@ -34,41 +34,41 @@