[ANN] All Fixtures plugin

Just released a very simple plugin for including all fixtures in your
tests. Once you have a large number of table, manually managing the
fixtures for every single test stub can be quite tedious.

Use as follows

class BlogArticleTest < Test::Unit::TestCase
def test_foo


Couldn’t be easier. More info here:

It works by simply scanning the fixtures directory for *.yml files, and
converts it to an array of symbols that gets passed to the fixtures
method. Performance seems identical with and without.

Hope it makes someone life easier.

Nice. I like this code to gather the fixture files, but it’s just a
different taste.

fixture_list = Dir.entries(File.join(RAILS_ROOT,
‘test/fixtures’)).inject([]) do |array, file|
array << $`.to_sym if file =~ /.yml$/


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs