Skip to content

Instantly share code, notes, and snippets.

@petrokoriakin
Created February 10, 2012 14:32
Show Gist options
  • Save petrokoriakin/1789924 to your computer and use it in GitHub Desktop.
Save petrokoriakin/1789924 to your computer and use it in GitHub Desktop.
code sample describing the process of the spec initialization
describe 'Comment model', ->
beforeEach ->
interaxt.SHOW_HOST = 'testhost'
@xhr = sinon.useFakeXMLHttpRequest()
@requests = []
@xhr.onCreate = (xhr) =>
@requests.push xhr
afterEach ->
@xhr.restore
describe 'when the user is a PUBLISHER', ->
beforeEach ->
stateUrl = '/testhost/s'
interaxt.init()
@requests[0].respond 200, {'Content-Type': 'application/json'}, @stringify_response(@fixtures.ShowEvents.show_event)
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