Sha256: af9da4417e88b901f1844d45683858009db088eee32eb3d8220a0ce8245d006f
Contents?: true
Size: 816 Bytes
Versions: 1
Compression:
Stored size: 816 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper') describe 'model' do use_orm :active_record before :each do remove_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 read_model(:account).should have_comment 'hello' Rails.application.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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
generator-spec-0.5.0 | spec/generator_spec/rails_helpers/rails_model_spec.rb |