Sha256: e426563d7ec2b342eb1344c513b06132708746f2ff71c03f913ace3762b21e77

Contents?: true

Size: 796 Bytes

Versions: 1

Compression:

Stored size: 796 Bytes

Contents

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
    root_dir.should have_model_file :account do |file|
      file.should have_model_class :account
    end
    root_dir.should have_model :account
  end
end

describe 'model helper - no ORM helper' do
  use_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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rails-app-spec-0.1.0 spec/rails_app_spec/matchers/artifact/model_spec.rb