Sha256: 3aa4229ecbaf630e418c423b6580f98a0a2d34d0c7b00eeb466686d24150c664

Contents?: true

Size: 881 Bytes

Versions: 4

Compression:

Stored size: 881 Bytes

Contents

require 'spec_helper'

describe 'model without orm' do
  use_orm :none

  before :each do  
    Rails3::Assist::Directory.rails_root = fixtures_dir
    
    delete_model(:account) if has_model? :account                
    create_model :account do
      %q{def index
  end}
    end    
  end

  after :each do              
    # remove_model :account
  end
    
  it "should have an account_model file that contains an index method and two inserted comments" do
    insert_into_model :account, :content => '# hello'
    insert_into_model :account do
      '# goodbye'
    end
    puts read_model(:account)
    read_model(:account).should have_comment 'hello'

    # root_dir.should have_model :account do |model_file|
    #   model_file.should have_method :index
    #   model_file.should have_comment 'hello'
    #   model_file.should have_comment 'goodbye'
    # end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rails3_artifactor-0.1.5 spec/rails3_artifactor/artifact/crud/model_spec.rb
rails3_artifactor-0.1.4 spec/rails3_artifactor/artifact/crud/model_spec.rb
rails3_artifactor-0.1.3 spec/rails3_artifactor/artifact/crud/model_spec.rb
rails3_artifactor-0.1.2 spec/rails3_artifactor/artifact/crud/model_spec.rb