require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper') describe 'model helper' do use_orm :active_record before :each do create_model :account, :content => '# hello' end after :each do remove_model :account end it "should have an :account model file that contains an Account class" do Rails.application.should have_model :account do |file| file.should have_class :account end end end describe 'model helper - no ORM helper' do load_helper :model before :each do remove_model :account end it "should not be able to create a model without including an ORM helper" do lambda {create_model :account}.should raise_error end end