0
I Use This!
Activity Not Available

Project Summary

Foxify Fixtures plugin for Rails(See original blog post: http://edgenic.com/2008/06/11/foxify-fixtures-plugin-refactor-those-old-fixtures-to-make-them-foxy)

Foxify fixtures refactors your Rails application test fixtures by changing all id-based references to name-based references (see http://ryandaigle.com/articles/2007/10/26/what-s-new-in-edge-rails-fixtures-just-got-a-whole-lot-easier). It should work on both regular Test fixtures as well as Rspec fixtures.

The plugin assumes that various conventions are followed, for instance:

all foreign keys end with 'id' class names are the "camelized", singular form of the table names Given these assumptions, Foxify fixtures may not work if your models and relationships deviate from the default Rails way of doing things.

One caveat: This plugin only "foxifies" the actual fixture .yml files themselves. If your tests access the fixtures based on ID's, those will have to be manually refactored to access the fixtures based on names.

UsageAlthough the plugin will try to back up your fixtures into a directory named 'backup' where your fixtures are located, it's a good idea to back up your app before running the plugin.

Run as follows:

rake db:fixtures:foxify
TroubleshootingFoxify fixtures relies upon the associations an app has defined in it's models. If an association is missing, for example having a 'has_many :books' association in your Author model, but missing the respective 'belongs_to :author' in your Book model, the you'll get an error message telling you what foreign key is missing the association. It's also possible that the plugin will incorrectly complain about your associations, if they don't follow the default Rails conventions.

Copyright (c) 2008 Bruz Marzolf, released under the MIT license

Tags

fixtures foxy plugin rails ruby rubyonrails

In a Nutshell, foxify-fixtures-plugin...

 No code available to analyze

Open Hub computes statistics on FOSS projects by examining source code and commit history in source code management systems. This project has no code locations, and so Open Hub cannot perform this analysis

Is this project's source code hosted in a publicly available repository? Do you know the URL? If you do, click the button below and tell us so that Open Hub can generate statistics! It's fast and easy - try it and see!

Add a code location

MIT License
Permitted

Sub-License

Private Use

Commercial Use

Modify

Distribute

Forbidden

Hold Liable

Required

Include Copyright

Include License

These details are provided for information only. No information here is legal advice and should not be used as such.

All Licenses

This Project has No vulnerabilities Reported Against it

Did You Know...

  • ...
    Black Duck offers a free trial so you can discover if there are open source vulnerabilities in your code
  • ...
    you can embed statistics from Open Hub on your site
  • ...
    65% of companies leverage OSS to speed application development in 2016
  • ...
    by exploring contributors within projects, you can view details on every commit they have made to that project

 No code available to analyze

Open Hub computes statistics on FOSS projects by examining source code and commit history in source code management systems. This project has no code locations, and so Open Hub cannot perform this analysis

Is this project's source code hosted in a publicly available repository? Do you know the URL? If you do, click the button below and tell us so that Open Hub can generate statistics! It's fast and easy - try it and see!

Add a code location

Community Rating

Be the first to rate this project
Click to add your rating
   Spinner
Review this Project!
Sample ohloh analysis