06 Sep '12, 2pm

Prevent panic by Testing Your Factories First.

September 6, 2012 Tagged: factories factory girl testing Comments (View) Testing Your Factories First Have you ever added a seemingly innocent validation to a model, like so: class User < ActiveRecord::Base validates_presence_of :first_name end And then had this happen?: $ rake spec If you’re using FactoryGirl , this can often happen because you haven’t updated your factory to respect the new validation. Of course, the fix is simple: # spec/factories.rb FactoryGirl.define do factory :user do first_name 'Jonah' end end But how do you save yourself the time (and potential heart attack) of watching all those dreaded F s go by? Watching Over Your Factories My old solution used to be adding a boilerplate test in each model’s unit spec, like so: # spec/models/user_spec.rb describe User do it 'has a valid Factory' do build(:user).should be_valid end end This is better than nothin...

Full article: http://robots.thoughtbot.com/post/30994874643/testing-you...

Tweets

Cadillac ELR caught testing in production form

Cadillac ELR caught testing in production form

green.autoblog.com 06 Sep '12, 10pm

to go forward with a production version of the fetching Converj concept more than a year ago, all has been pretty quiet on...

Testing your Ruby/Rails 3.x Model with Cucumber...

michelrvaillancourt.com 06 Sep '12, 1pm

So I’m working on a Ruby/Rails development project for a customer, and using TDD /BDD from word “Go”. The weapon of choice...

Coast Guard planning for first fitness test

navytimes.com 06 Sep '12, 2pm

The Coast Guard is narrowing its list of exercises that eventually could serve as a first-ever servicewide physical fitnes...

What’s it like to fly in a First Class Suite on...

aluxurytravelblog.com 06 Sep '12, 11am

Ever wondered what it must be like to fly on a First Class Suite on an Emirates A380. YouTube user Volterrific shares with...

Google Testing Search Options Listed Above Resu...

searchengineland.com 08 Sep '12, 12am

Google appears to be testing out a new navigational layout, one that takes the search options that normally show in the le...

The F-35A has completed 8,000 hours of durabili...

baesystems.com 19 Sep '12, 3pm

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

asserting only 1 thing in your tests helps your...

blog.jayfields.com 12 Sep '12, 5pm

I use multiple assertions per test, and here's why: 1. I'm asserting behavior, not individual lines of code. 2. I've found...

I go to NY. #narita #ana #first #rolex #explorer1 #vanquish

I go to NY. #narita #ana #first #rolex #explore...

instagram.com 07 Sep '12, 1am

vanquishceo RYO ISHIKAWA I'm VANQUISH.from Tokyo JAPAN. I love cars & watch & shoes. | iPhone | Leica M9 | Fijifilm x100 |...

Arcimoto will build 15 EVs for more testing

Arcimoto will build 15 EVs for more testing

green.autoblog.com 11 Sep '12, 9pm

will become the little electric motor that could. The Oregon-based maker of three-wheeled battery-electric vehicles, is pl...

Tochigi Prefecture to Nissan e-NV200 battery-el...

greencarcongress.com 03 Sep '12, 10am

Tochigi Prefecture to Nissan e-NV200 battery-electric commercial vehicle; V2X testing by end of fiscal year 3 September 20...

KRI Klewang – First Stealthy Trimaran Patrol Vessel for the Indonesian Navy via Defense Update -

KRI Klewang – First Stealthy Trimaran Patrol Ve...

defense-update.com 06 Sep '12, 10am

The trimaran hull shape is intended to permit high speeds to be maintained and thus maximize crew operational capability i...

F-35B Completes First Airborne Engine Start Tests

navy.mil 05 Sep '12, 1am

EDWARDS AIR FORCE BASE, Calif. (NNS) -- The F-35 integrated test force announced the completion of a major prerequisite te...

Sinatra ทำ Test สวยนะฮะ

sinatrarb.com 09 Sep '12, 12pm

require 'hello_world' require 'test/unit' require 'rack/test' set :environment, :test class HelloWorldTest < Test::Unit::T...

First US Green Building Safety Program Implemen...

edcmag.com 06 Sep '12, 4pm

Sellen Sustainability announced the launch of the nation’s first green building safety program to proactively address pote...

@HWUnion @HeriotWattUni There is currently a di...

lothianbuses.com 09 Sep '12, 10pm

View and download timetables ---- Choose a timetable ---- 1 - Clermiston - Easter Road 2 - Gyle Centre - The Jewel 3 - Clo...