Sha256: c2063a3727b1306c74819da2c642bfc7f6c54f7f64dec2dca99b8391dfffcc00

Contents?: true

Size: 755 Bytes

Versions: 1

Compression:

Stored size: 755 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
    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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
generator-spec-0.5.0 spec/generator_spec/matchers/rails/model_matcher_spec.rb