Friday, May 20, 2016

Code Examples in OneNote the hard way

The final result will look like this:
spyOn(someObject, "someMethod").and.returnValue($q.resolve(someValue));
spyOn(someObject, "someMethod").and.returnValue($q.reject(someValue));

  1. Create a table with one cell
  2. Select the cell
  3. Click Layout > Shading > black
  4. Paste or write your code example inside the cell
  5. Highlight the code
  6. Change font color to white
  7. Click Review > Language > Set proofing language
  8. Choose a language on the right that no-one on your team is likely to have installed
  9. Paint the strings, globals and keywords appropriately