Skip to content

Instantly share code, notes, and snippets.

@vinibaggio
Created September 29, 2010 14:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vinibaggio/602829 to your computer and use it in GitHub Desktop.
Save vinibaggio/602829 to your computer and use it in GitHub Desktop.
module Spec
module MyHelper
def account
accounts(:blank_account)
end
def accounts(fixture)
@fixtures_cache ||= Fixtures.create_fixtures('spec/fixtures', 'accounts')
@fixture_hash ||= Hash[@fixtures_cache]
@fixture_hash[fixture.to_s].find
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment