29 Apr '13, 6am

Python web testing for the Ruby programmer via @pivotallabs

Ruby has a couple of well-known libraries for unit testing, mocking and stubbing HTTP interactions. My typical toolset includes RSpec, WebMock and VCR. I had the chance to work on a Python project recently and did some investigation into similar libraries for Python. General testing libraries The two most popular python test libraries + runners are py.test and nose . A neat feature of py.test is that is gets by with only the builtin ‘assert’ keyword: the test runner expands assertion failures to show exactly how the assertion failed e.g.: ===================== FAILURES ===================== _____________________ test_web _____________________ def test_web(): resp = c.get('/') > assert resp.status == '404' E assert '200 OK' == '404' E - 200 OK E + 404 lib/test_snack_overflow.py:9: AssertionError ============= 1 failed in 0.24 seconds ============= One gotcha is that py.test...

Full article: http://pivotallabs.com/python-web-testing-for-the-ruby-pr...

Tweets

Typhoon test pilot @NatMakepeace has stars in h...

baesystems.com 29 Apr '13, 9am

This page uses JavaScript and requires a JavaScript enabled browser.Your browser is not JavaScript enabled.

Should a web and iOS project have one or two tr...

pivotallabs.com 30 Apr '13, 7pm

Should a web and iOS project have one or two tracks/teams/IPMs? I posted that question to our internal Q&A forum a few mon...

Killer PPC Testing Using an Ad Testing Matrix

Killer PPC Testing Using an Ad Testing Matrix

searchenginewatch.com 30 Apr '13, 11am

Ad copy testing is one of the basic tenets of PPC advertising. The ability to test several ad variations at once is valuab...

@andr3 Are you using ruby 1.8? Vide

sass-lang.com 29 Apr '13, 12pm

Whether an error in the Sass code should cause Sass to provide a detailed description within the generated CSS file. If se...

Backbone vs Rails: Some things to consider - Pi...

pivotallabs.com 29 Apr '13, 3pm

(Note: For most of this article, feel free to mentally substitute Ember, Angular, or your JS framework of choice for Backb...

そういうテストもありか "#‌411 Performance Testing (pro) - ...

railscasts.com 28 Apr '13, 4pm

Not to be that guy, but as i usually see valid questions after the railscasts episodes, I'm wondering why Ryan doesn't see...

I wrote an article for @123reg it's got some pr...

123-reg.co.uk 29 Apr '13, 10am

Now, if that hasn’t scared you off, let’s get on with this shall we? Why the hell is the internet full of cats? Are they t...

@peterc Many thanks for mentioning our courses ...

rubyweekly.com 25 Apr '13, 3pm

Parsing JSON The Hard Way From the Practicing Ruby journal comes an excellent walkthrough of building a JSON parser from A...

When Google Gets It Wrong By Changing The Titles Of Web Pages

When Google Gets It Wrong By Changing The Title...

searchengineland.com 30 Apr '13, 9pm

Google doesn’t always use the HTML title tag of a web page, choosing instead to make its own title for a page, if it think...

Reflection, ObjectSpace, and Distributed Ruby n...

rubycentral.org 11 May '13, 3pm

[This Eiffel-inspired idiom of renaming a feature and redefining a new one is very useful, but be aware that it can cause ...

@SplendidSpoon Testing is hard. I still kind of...

everydayrails.com 01 May '13, 7pm

Write tests to test functionality you’re pretty confident works because you’ve been using it for awhile without tests. Thi...

これ、使えないのかな・・・?

guides.rubyonrails.org 02 May '13, 4am

# routes.rb root :to => 'home#index' resources :posts # home_controller.rb class HomeController < ApplicationController de...

これはほぼシボンヌなのかな……

rubyforge.org 01 May '13, 10pm

Uno For Open Office and Ruby (Ufooar) is an automation project. The goal is to provide a complete Uno bridge in Ruby for O...

Ruby関係の情報源は A Fresh Cup Pivotal LabsのDaily Stan...

pivotallabs.com 30 Apr '13, 5am

Fierce battles in the BLOGGERDOME week 1 for the $500 cash prize (Parker.new) 9 entered. 8 survived. Surviving to fight fo...

Norman: Drug testing procedure disgraceful: Australian says blood testing must be implemented into the game

Norman: Drug testing procedure disgraceful: Aus...

golfmagic.com 29 Apr '13, 2pm

Singh and Norman at the 2009 Presidents Cup Greg Norman has described golf’s anti-doping procedures as ‘disgraceful’ and b...