Skip to content

Repository files navigation

Generate fixtures from factories in you testcode to speedup test-runs!

Requires shoulda 2.11.3 (exact version for now - sorry)

thies@tmp8.de 20110207

see test/rails3 for a demo usage

in test_helper.rb:

require'fixture_background'classActiveSupport::TestCaseinclude::FixtureBackground::ActiveSupport::TestCaseend

in some_test.rb:

require'test_helper'classTestTest<ActiveSupport::TestCasebackgrounddo@hase = Hase.create(:name=>"bunny")
endcontext"with thies"dobackgrounddo@thies = Person.create(:name=>"thies")
endshould"be cool"doassert@haseassert@thiesassert_nil@manuelassert_nil@normanassert_equal1, Person.countendcontext"with manuel"dobackgrounddo@manuel = Person.create(:name=>"manuel")
endshould"be cool"doassert@haseassert@thiesassert@manuelassert_nil@normanassert_equal2, Person.countendcontext"with norman"dobackgrounddo@norman = Person.create(:name=>"norman")
endshould"be cool"doassert@haseassert@thiesassert@manuelassert@normanassert_equal3, Person.countendendendshould"nother truth"doassert@haseassert@thiesassert_nil@manuelassert_nil@normanassert_equal1, Person.countendendend

About

Fast fixtures for your App

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages