 Market = require('../../lib/datastore/market')
 Book = require('../../lib/datastore/book')
 Order = require('../../lib/datastore/order')
-
-# TODO, ISSUE, HACK - don't monkey patch Number!
-Number::leq = (y) -> @ <= y
 
 describe 'Market', ->
   bob = {name: 'bob'}

    @market.right_book.add_order = sinon.spy()
    @market.left_book.add_order = sinon.spy()

    order1 = new Order(@bob, 'BTC', 1, 'USD', 10)
    order2 = new Order(@sue, 'USD', 1, 'BTC', 10)

    @market.add_order(order1)
    @market.right_book.add_order.should.have.been.calledOnce

    @market.left_book.add_order.should.have.been.calledOnce

  it 'should close an order if there is a full match', ->
    order1 = sellBTC(@bob, 1, 10)
    order2 = buyBTC(@sue, 1, 10)
    
    @market.add_order(order1)
    results = @market.add_order(order2)
