I hereby claim:
- I am mikepack on github.
- I am mikepack (https://keybase.io/mikepack) on keybase.
- I have a public key ASAoHHutu5Q4xJx7dLfSuriZV7fgxkmWw1XRRm2JTcGM9go
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| class User | |
| def name | |
| 'Mike Pack' | |
| end | |
| end | |
| class GuestUser | |
| def name | |
| 'Guest User' | |
| end |
| class Car | |
| def drive | |
| # get_in | |
| start_engine | |
| accelerate | |
| # park | |
| end | |
| end | |
| class Ford < Car |
| require 'irb/completion' | |
| require 'brice' | |
| Brice.init do |config| | |
| config.exclude 'libs' | |
| end | |
| IRB.conf[:AUTO_INDENT] = true |
| class Animal | |
| def run | |
| puts 'running' | |
| end | |
| end | |
| Animal.new.run #=> running | |
| class Wolf < Animal | |
| def follow_pack |
| # High-Low Testing | |
| ## Seeking a better workflow | |
| ## Dependencies are a necessary evil | |
| ## Getting started | |
| ### Testing high | |
| ### Testing low | |
| ## Isolating the framework | |
| ### Example refactor to isolate the framework | |
| ## Feedback, feedback, feedback |
| var DNA = function(sequence){ | |
| this.sequence = sequence; | |
| this.nucleotideCounts = this._countNucleotides(); | |
| }; | |
| DNA.prototype = { | |
| count: function(marker){ | |
| this._checkMarker(marker); | |
| return this.sequence.split(marker).length - 1; | |
| }, |
| AppTest.setupComponent = (name, content, options, setupCallback=null)-> | |
| beforeEach -> | |
| Ember.$('<div id="test-container"><div id="test"></div></div>').appendTo('body'); | |
| Ember.run -> | |
| AppTest.App = Ember.Application.create | |
| rootElement: '#test' | |
| setInterval(updateDockBadge, 5000); | |
| setTimeout(notifyUnread, 5000); | |
| var currentCount = '0'; | |
| function updateDockBadge() { | |
| currentCount = jQuery('#unread_count .badge-info').text(); | |
| window.fluid.dockBadge = currentCount; | |
| } | |
| var oldCount = '0'; |
When testing Ember code, without putting expectations in a Ember.run callback, you'll get this error:
Failure/Error: Assertion Failed: You have turned on testing mode, which disabled the run-loop's autorun. You will need to wrap any code with asynchronous side-effects in an Ember.run
The error recommends wrapping expectations in Ember.run:
describe 'something', ->