Skip to content

Instantly share code, notes, and snippets.

View phlcastro's full-sized avatar

Paulo Henrique Castro phlcastro

View GitHub Profile
@phlcastro
phlcastro / example.rb
Created May 14, 2016 01:59
How to deal with random values on RSpec
allow(YourClass).to receive(:your_method).with('your parameter').and_return('your result')
#ie.:
allow(Random).to receive(:rand).with(1..9).and_return(7)

Keybase proof

I hereby claim:

  • I am phlcastro on github.
  • I am phlcastro (https://keybase.io/phlcastro) on keybase.
  • I have a public key whose fingerprint is E68C 2259 7DCC 2CE4 3973 F666 49DB B464 D54C E49C

To claim this, I am signing this object:

export default function() {
// These comments are here to help you get started. Feel free to delete them.
/*
Config (with defaults).
Note: these only affect routes defined *after* them!
*/
@phlcastro
phlcastro / my_entry.jsx
Created September 28, 2016 02:51
Use of CommonsChunkPlugin on webpack
import React from 'react';
import ReactDom from 'reactDom';