Warning: Creating default object from empty value in /homepages/39/d161420129/htdocs/p373.net/wp/wp-content/themes/p373b/admin/functions.php on line 183
Tag Archives: rspec

Stub a ruby method and conditionally raise an exception based upon state of object

(If you want to skip my fancy and hilarious writing, skip straight to the SO post) Here’s the use case: You’re building  a mass email system for your globo-mega-corp’s 90,000 employees.  Your corp’s smtp server can only handle batches of 450 recipients at a time.  Your boss tells you your corp’s SMTP server is finicky […]

Posted in Coding, Ruby/Rails, Technology | Also tagged , | Comments closed

Capybara custom matcher alternative

Sometimes when writing specs, you want to test a high level case multiple times across multiple spec tests.  This test may involve asserting multiple things on the page. There is probably a proper way to do this, like see this gist , or there is my way, which seems way simpler. So the objective is to […]

Posted in Coding, Ruby/Rails, Technology, Uncategorized | Also tagged | Comments closed