RailsCasts Pro episodes are now free!

Learn more or hide this

Peter Schr's Profile

GitHub User: phoet

Site: http://blog.nofail.de

Comments by Peter Schr

Avatar

especially if you put these into rspec let blocks:

ruby
describe Bla do
  let(:matt) { Factory.create :user { |f| f.name "Matt" } }

  it "should have a valid name" do
    matt.name.should eql('Matt')
  end
end
Avatar

if you are interested in having really fast tests, have a look at corey haines talk: lanyrd.com/2011/gogaruco/shmhw/