         m.my_method()
     ).should.throw(format(messages.DuplicateExpectation, "my_method", ""))
 
-  it "throws an error when the same method throws the same values", ->
+  it "throws an error if the same method throws the same values", ->
     (->
       mock (m) ->
         m.expects("my_method").throws("an error")

        m.my_method()
    ).should.throw(format(messages.DuplicateExpectation, "my_method", ""))

  it "throws an error when the same method returns different values", ->
    (->
      mock (m) ->
        m.expects("my_method").returns(1)

        m.my_method()   # otherwise we'll get a 'my_method() not called' error
    catch
      # eat the error thrown by throws()

  it "causes the mock method to throw the specified error", ->
    mock (m) ->
      m.expects("my_method").throws(new Error("an error"))
      (-> m.my_method() ).should.throw("an error")

  it "can be called after args()", ->
    (->
      mock (m) ->
        m.expects("my_method").args(1,2,3).throws(new Error("an error"))
        m.my_method(1,2,3)
    ).should.throw("an error")

  it "can be called even if a return value has been previously set on the same method with a different expectation", ->
    mock (m) ->
      m.expects("my_method").args(1,2,3).returns(42)
      m.expects("my_method").args(4,5,6).throws(new Error("an error"))
      m.my_method(1,2,3)
      (-> m.my_method(4,5,6) ).should.throw("an error")

  describe "usage errors", ->

    it "throws an error if no 'error' argument is specified", ->
      (->
        mock (m) ->
          m.expects("my_method").throws()
      ).should.throw(format(messages.ThrowsUsage))

    it "throws an error if more than one argument is specified", ->
      (->
        mock (m) ->
          m.expects("my_method").throws(new Error("error 1"), new Error("error 2"))
      ).should.throw(format(messages.ThrowsUsage))

    it "throws an error if throws() has already been used", ->
      (->
        mock (m) ->
          m.expects("my_method").throws("an error").throws("another error")
      ).should.throw(format(messages.ThrowsUsedMoreThanOnce))

    it "throws an error if a return value has already been specified", ->
      (->
        mock (m) ->
          m.expects("my_method").returns(42).throws(new Error("an error"))
      ).should.throw(format(messages.ReturnsAndThrowsBothUsed))

    it "throws an error if called more than once on the same expectation", ->
      (->
        mock (m) ->
          m.expects("my_method").throws(new Error("error1"))
          m.expects("my_method").throws(new Error("error1"))
          m.my_method()
      ).should.throw(format(messages.DuplicateExpectation, "my_method", ""))



describe "my_method( [ arg ... ] )", ->

  it "does not throw an error if a method is called without arguments and none were expected", ->
    mock (m) ->
      m.expects("my_method")
      m.my_method()

  it "does not throw an error if a method is called with arguments that were expected", ->
    mock (m) ->
      m.expects("my_method").args(1,2,3)
      m.my_method(1,2,3)

  it "returns the value specified in a returns()", ->
    mock (m) ->
