diff options
| author | mo khan <mo@mokhan.ca> | 2014-07-07 22:25:54 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2014-07-07 22:25:54 -0600 |
| commit | 7f994b01baa0709d5dca2a2ecb223e6c29dc760f (patch) | |
| tree | edfeeb02447d7acda46d3f7b57aecb4ef1cf3788 | |
| parent | e0d05540f3c29c6f70a6c2f84a38085d20f7d028 (diff) | |
remove greeting class.
| -rw-r--r-- | app/assets/javascripts/utility/greeting.js.coffee | 8 | ||||
| -rw-r--r-- | app/views/creations/index.html.erb | 3 | ||||
| -rw-r--r-- | app/views/tutorials/index.html.erb | 3 | ||||
| -rw-r--r-- | spec/javascripts/utility/greeting_spec.js | 16 |
4 files changed, 2 insertions, 28 deletions
diff --git a/app/assets/javascripts/utility/greeting.js.coffee b/app/assets/javascripts/utility/greeting.js.coffee deleted file mode 100644 index cea58c7f..00000000 --- a/app/assets/javascripts/utility/greeting.js.coffee +++ /dev/null @@ -1,8 +0,0 @@ -class window.Greeting - constructor:(@name) -> - - greet: () -> - 'hi ' + @name - - goodbye: () -> - 'goodbye ' + @name diff --git a/app/views/creations/index.html.erb b/app/views/creations/index.html.erb index 0addba34..b38f687b 100644 --- a/app/views/creations/index.html.erb +++ b/app/views/creations/index.html.erb @@ -1,8 +1,7 @@ <% provide(:description, "CakeSide is a free site to share your cake creations and ideas with other cake fanatics like yourself") -%> <% content_for :javascript do -%> <script type="text/javascript"> - var ready = function(){ new Masonry('#creations-div').load(); }; - $(document).ready(ready); + $(function(){ new Masonry('#creations-div').load(); }); </script> <% end -%> <% unless user_signed_in? -%> diff --git a/app/views/tutorials/index.html.erb b/app/views/tutorials/index.html.erb index a981cc85..17794fa7 100644 --- a/app/views/tutorials/index.html.erb +++ b/app/views/tutorials/index.html.erb @@ -1,8 +1,7 @@ <% provide(:description, "The latest tutorials") -%> <% content_for :javascript do -%> <script type="text/javascript"> - var ready = function(){ new Masonry('#tutorials-div').load(); }; - $(document).ready(ready); + $(function(){ new Masonry('#tutorials-div').load(); }); </script> <% end -%> <div id="tutorials-div" class="row"> diff --git a/spec/javascripts/utility/greeting_spec.js b/spec/javascripts/utility/greeting_spec.js deleted file mode 100644 index dc1e5bf8..00000000 --- a/spec/javascripts/utility/greeting_spec.js +++ /dev/null @@ -1,16 +0,0 @@ -describe ("Greeting", function() { - beforeEach (function() { - sut = new Greeting('mo'); - }); - var sut; - describe ("when greeting someone", function() { - it ("should say their name", function() { - expect(sut.greet()).toEqual('hi mo'); - }); - }); - describe ("when saying goodbye", function() { - it ("should say their name", function() { - expect(sut.goodbye()).toEqual('goodbye mo'); - }); - }); -}); |
