Skip to content

Instantly share code, notes, and snippets.

@jeffkreeftmeijer
Created May 6, 2010 09:09
Show Gist options
  • Save jeffkreeftmeijer/391949 to your computer and use it in GitHub Desktop.
Save jeffkreeftmeijer/391949 to your computer and use it in GitHub Desktop.
require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
describe 'Machinist' do
models = Dir[File.expand_path(File.dirname(__FILE__) + '/../app/models/*.rb')].
map{|file| File.basename(file, '.rb') } - %w{mailer}
models.map{ |model| model.classify.constantize }.each do |model|
it "should have a blueprint for the #{model} model" do
model.make.should be_instance_of(model)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment