Midwest Dev Chat

MidwestDevChat.com github.com/skidvis/Midwest-Dev-Chat

  • The newest 15 messages in the super-cool #ruby channel.

  • 01/12 13:58:06 Ida: Yup, that's what I was about to say

  • 01/12 13:58:14 Ida: :+1:

  • 01/12 13:58:29 Vivienne: This is what happens when you work remote.

  • 01/12 13:59:02 Leone: yeah in that case you could just stub it with a raise

  • 01/12 13:59:41 Vivienne: yeah, already had that test case, for some reason i was thinking “hm, you know, …"

  • 01/12 14:02:40 Ida: you could always just

    expect do
    
    expect(object).to receive(:test).and_raise(TimeoutError)
    object.test
    http://end.to raise_error(TimeoutError)

  • 01/12 14:03:19 Leone: why the nesting?

  • 01/12 14:03:42 Ida: It's just a joke

  • 01/12 16:38:56 Nicole: have you thought about using something like VCR and returning a timeout?

  • 01/12 16:39:47 Nicole: If you’re working with a 3rd party API I’d highly suggest using VCR to replay different responses from the API

  • 01/12 16:40:20 Leone: you definitely want to avoid making http calls in a test

  • 01/12 16:40:23 Nicole: yes

  • 01/12 16:40:56 Nicole: and honestly some API’s return odd error’s for things. I work with a SOAP api that doesn’t return a timeout, just some crazy output and jumbles up my side

  • 01/12 18:48:00 Vivienne: oh, no; it’s my library/gem, and then the consumer, i got enough testing on the api wrapper gem. now i’m mocking the call to that gem. like i said, i don’t know what i was thinking, too much holiday cheer.

  • 01/13 08:09:56 Nicole: lol

  • *Usernames have been changed to protect the innocent.

Check out all the cool channels!

Join the conversation!