-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: attempted to get jasmine unit tests running, failed, dismally
modified: Gemfile modified: Gemfile.lock -- added a combined test / dev group modified: app/assets/javascripts/app.js -- removed textual dependencies for angular di framework new file: app/assets/javascripts/jasmine_examples/Player.js new file: app/assets/javascripts/jasmine_examples/Song.js new file: public/javascripts/Player.js new file: public/javascripts/Song.js -- files added from tutorial, should be deleted modified: app/assets/javascripts/application.js new file: app/assets/javascripts/directives.js modified: app/assets/templates/home.html modified: app/views/home/index.html.erb modified: app/views/layouts/application.html.erb modified: config/routes.rb -- attempted to add a route that would permenently redirect to angular for text/html requests. route not actually needed deleted: spec/javascripts/angular/controllersSpec.js new file: spec/javascripts/angular/e2e/runner.html new file: spec/javascripts/angular/e2e/scenarios.js new file: spec/javascripts/angular/lib/angular-mocks.js new file: spec/javascripts/angular/lib/angular-scenario.js new file: spec/javascripts/angular/lib/version.txt new file: spec/javascripts/angular/unit/controllersSpec.js new file: spec/javascripts/angular/unit/directivesSpec.js new file: spec/javascripts/angular/unit/filtersSpec.js new file: spec/javascripts/angular/unit/servicesSpec.js new file: spec/javascripts/helpers/.gitkeep new file: spec/javascripts/helpers/SpecHelper.js new file: spec/javascripts/jasmine_examples/PlayerSpec.js new file: spec/javascripts/support/jasmine.yml -- jasmine stuff new file: vendor/assets/javascripts/angular-resource.js new file: vendor/assets/javascripts/angular-ui-ieshiv.js new file: vendor/assets/javascripts/angular-ui.css new file: vendor/assets/javascripts/angular-ui.js new file: vendor/assets/javascripts/angular.js -- correctly added angular to asset pipeline, and added angular-ui library
- Loading branch information
Showing
15 changed files
with
16,362 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
var bawApp = angular.module('baw', function() { | ||
return function(scope, element, attrs) { | ||
element.css('display', 'none'); | ||
scope.$watch(attrs.ngDsFade, function(value) { | ||
if (value) { | ||
element.fadeIn(200); | ||
} | ||
else { | ||
element.fadeOut(100); | ||
} | ||
}); | ||
} | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
function Player() { | ||
} | ||
Player.prototype.play = function(song) { | ||
this.currentlyPlayingSong = song; | ||
this.isPlaying = true; | ||
}; | ||
|
||
Player.prototype.pause = function() { | ||
this.isPlaying = false; | ||
}; | ||
|
||
Player.prototype.resume = function() { | ||
if (this.isPlaying) { | ||
throw new Error("song is already playing"); | ||
} | ||
|
||
this.isPlaying = true; | ||
}; | ||
|
||
Player.prototype.makeFavorite = function() { | ||
this.currentlyPlayingSong.persistFavoriteStatus(true); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
function Song() { | ||
} | ||
|
||
Song.prototype.persistFavoriteStatus = function(value) { | ||
// something complicated | ||
throw new Error("not yet implemented"); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<h1>This is a test</h1> | ||
|
||
<p>{{welcomeMessage}}</p> | ||
<p id="wmg">{{welcomeMessage}}</p> | ||
|
||
<a href="#/projects/" >fun times</a> | ||
<a href="#/site/" >funny times</a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +0,0 @@ | ||
<h1>Home#index</h1> | ||
<p>Find me in app/views/home/index.html.erb</p> | ||
|
||
|
||
<%= link_to "Photos", photos_path %> | ||
<%= link_to "Projects", projects_path %> | ||
<%= link_to "Sites", sites_path %> | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
function Player() { | ||
} | ||
Player.prototype.play = function(song) { | ||
this.currentlyPlayingSong = song; | ||
this.isPlaying = true; | ||
}; | ||
|
||
Player.prototype.pause = function() { | ||
this.isPlaying = false; | ||
}; | ||
|
||
Player.prototype.resume = function() { | ||
if (this.isPlaying) { | ||
throw new Error("song is already playing"); | ||
} | ||
|
||
this.isPlaying = true; | ||
}; | ||
|
||
Player.prototype.makeFavorite = function() { | ||
this.currentlyPlayingSong.persistFavoriteStatus(true); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
function Song() { | ||
} | ||
|
||
Song.prototype.persistFavoriteStatus = function(value) { | ||
// something complicated | ||
throw new Error("not yet implemented"); | ||
}; |
Oops, something went wrong.