Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Test Driven Development

Test Driven Development

Jun Lin

July 18, 2013
Tweet

More Decks by Jun Lin

Other Decks in Programming

Transcript

  1. subject(:hero) { Hero.first } it "carries a sword" do hero.equipment.should

    include "sword" end http://betterspecs.org/ Thursday, July 18, 13
  2. #import "TestHelper.h" #import "UserModel.h" SpecBegin(UserModel) describe(@"UserModel", ^{ describe(@".all", ^{ it(@"load

    all users", ^{ expect([UserModel all]).toNot.beEmpty(); }); }); }); SpecEnd https://github.com/linjunpop/Diamond/blob/master/DiamondTests/UserModelSpec.m Thursday, July 18, 13
  3. script: 'ci/travis.rb' before_install: - gem install bundler rvm: - 1.9.3

    - 2.0.0 env: - "GEM=railties" - "GEM=ap,am,amo,as,av" - "GEM=ar:mysql" - "GEM=ar:mysql2" - "GEM=ar:sqlite3" - "GEM=ar:postgresql" notifications: email: false irc: on_success: change on_failure: always channels: - "irc.freenode.org#rails-contrib" campfire: on_success: change on_failure: always https://github.com/rails/rails/blob/master/.travis.yml Thursday, July 18, 13