Commit 7f994b01
Changed files (4)
app
assets
javascripts
utility
views
creations
tutorials
spec
javascripts
utility
app/assets/javascripts/utility/greeting.js.coffee
@@ -1,8 +0,0 @@
-class window.Greeting
- constructor:(@name) ->
-
- greet: () ->
- 'hi ' + @name
-
- goodbye: () ->
- 'goodbye ' + @name
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? -%>
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">
spec/javascripts/utility/greeting_spec.js
@@ -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');
- });
- });
-});