Skip to content

Instantly share code, notes, and snippets.

@petrokoriakin
Created February 10, 2012 14:29
Show Gist options
  • Save petrokoriakin/1789914 to your computer and use it in GitHub Desktop.
Save petrokoriakin/1789914 to your computer and use it in GitHub Desktop.
code sample describing the process of the spec initialization
describe 'Comment model', ->
beforeEach ->
@xhr = sinon.useFakeXMLHttpRequest()
@requests = []
@xhr.onCreate = (xhr) =>
@requests.push xhr
interaxt.comments = new interaxt.models.Comments()
afterEach ->
@xhr.restore
describe 'when the user is a PUBLISHER', ->
beforeEach ->
interaxt.showEvent = new interaxt.models.ShowEvent()
interaxt.showEvent.createModels @fake_show_event(interaxt.ShowRoles.HOST)
it 'should execute before_each blocks without an errors', ->
expect(true).toBeTruthy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment