Skip to content

Instantly share code, notes, and snippets.

### Keybase proof
I hereby claim:
* I am noelrappin on github.
* I am noelrap (https://keybase.io/noelrap) on keybase.
* I have a public key whose fingerprint is 9D10 BE61 2831 3E78 345C F8B3 789C 84D0 FC55 9E5B
To claim this, I am signing this object:
class UnclaimedSlowTestException < Exception
THRESHOLD = 1
def initialize(example)
@example = example
end
def message
"This spec at #{@example.metadata[:location]} is slower than #{THRESHOLD} seconds.
AllCops:
Exclude:
- "db/schema.rb" # You can't touch this
- ".bundle/**/*" # Auto-generated
- "bin/**/*" # Auto-generated
- "vendor/**/*" # We cannot solve the world's problems
TargetRubyVersion: 2.3
Rails:
Enabled: true
@noelrappin
noelrappin / code_email.md
Created December 11, 2015 18:37
Code sample email

Hi,

We'd like to continue the application process with you.

For technical candidates, we ask that they submit a solution to a coding challenge. Take a look at this exercise: REDACTED

Here are a few things we'd like you to keep in mind as you work on this problem.

We encourage you to think of this in a real world context, meaning that a client really wants to DO THIS THING, (you can assume the client has a laptop with them and can run arbitrary command-line or web programs). In other words, we want you to solve the problem, not just the algorithm. How will the client run the program? How will the output be presented?

Keybase proof

I hereby claim:

  • I am noelrappin on github.
  • I am noelrap (https://keybase.io/noelrap) on keybase.
  • I have a public key whose fingerprint is 84D8 DF21 E2A5 56CD 18B6 880B B7C9 5761 2D75 E81F

To claim this, I am signing this object:

@noelrappin
noelrappin / index-test.js
Created October 14, 2014 19:13
Ember controller test with model
import {
moduleFor,
test
} from 'ember-qunit';
import Ember from 'ember';
import startApp from '../../../../helpers/start-app';
var App;
var store;
@noelrappin
noelrappin / index_controller_spec.js
Last active December 16, 2015 23:59
Ember integration test
// This is my attempt at an ember controller integration test based on http://jsfiddle.net/ekidd/hCsws/
// It almost works..
// Here's what doesn't work: Template lookup
// In the view description, I have
// template: Ember.TEMPLATES.index
//
// it should be
@noelrappin
noelrappin / description.md
Last active December 14, 2015 04:48
Problem I'm having with Ember and Jasmine

I'm trying to run an Ember controller in a Jasmine test, and it's giving me some trouble.

This spec works, in that it renders the controller, and most of the controller is rendered accurately and can be tested.

However, there is clearly a difference between how I'm setting up these objects in the test, and how Ember sets them up at run time, because parts of the controller are not working in the test...

Details:

  • The itemController is not accessed at all, which means that the reference to "startDateDisplay" (which is defined in the item controller) comes up empty.
Here's a description that is roughly the problem I'm having:
The ember.js site I'm working on has a number of different screens
(deliberately using a word that has no ember connotations).
Let's say, for the sake of argument, 3 of them.
Each of these screens has their own normal route, controller, model,
template structure. This is all standard.
Now I want a dashboard. For the sake of argument, let's say I want