<commit_before>require 'generator_spec/test_case'
require 'generators/migration_generator'

describe ActsAsLikedGenerator, type: :generator do
  include GeneratorSpec::TestCase

  destination File.expand_path("../tmp", File.dirname(__FILE__))

  before :all do
    prepare_destination
    run_generator
  end

  after :all do
    FileUtils.rm_r Dir.glob('tmp/*') # Clean up tmp after test
  end

  # it "creates a migration" do
  # 	assert_file "db/migrate/#{Regexp.new([0-9]*)}_acts_as_likeable_migration.rb"
  # end

  it "creates model" do
    assert_file "app/models/like.rb"
  end

  specify {
  	expect(destination_root).to have_structure { 
  		directory "db" do
  			directory "migrate" do
  				migration "acts_as_liked_migration"
  			end
  		end
  	}
  }
end<commit_msg>Fix generator spec<commit_after>require 'generator_spec/test_case'
require 'generators/acts_as_liked/migration_generator'

describe MigrationGenerator, type: :generator do
  include GeneratorSpec::TestCase

  destination File.expand_path("../tmp", File.dirname(__FILE__))

  before :all do
    prepare_destination
    run_generator
  end

  after :all do
    FileUtils.rm_r Dir.glob('tmp/*') # Clean up tmp after test
  end

  # it "creates a migration" do
  # 	assert_file "db/migrate/#{Regexp.new([0-9]*)}_acts_as_likeable_migration.rb"
  # end

  it "creates model" do
    assert_file "app/models/like.rb"
  end

  specify {
  	expect(destination_root).to have_structure { 
  		directory "db" do
  			directory "migrate" do
  				migration "acts_as_liked_migration"
  			end
  		end
  	}
  }
end
{'fraction_non_alphanumeric': 0.09816339455351489, 'fraction_numerical': 0.00253324889170361, 'mean_word_length': 3.6745562130177514, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4296064', 'n_tokens_mistral': 576, 'n_tokens_neox': 551, 'n_words': 121}