<commit_before>require 'spec_helper'

describe Redde::Generators::PhotoGenerator do
  include GeneratorSpec::TestCase
  destination File.expand_path("../../../tmp", __FILE__)

  before(:all) do
    prepare_destination
    run_generator
  end

  after(:all) do
    FileUtils.rm_rf 'tmp'
  end

  it "Generates controller" do
    assert_file "app/controllers/admin/photos_controller.rb"
  end

  it "Generates views" do
    assert_file "app/views/admin/photos/index.html.haml"
  end

  it "Generates model" do
    assert_file "app/models/photo.rb"
  end

  it "Generates migration" do
    files = Dir["tmp/db/migrate/*.rb"]
    expect(files.map(&:to_s).join(" ").index("create_photos")).to eq 30
  end

end<commit_msg>Fixed specs<commit_after>require 'spec_helper'

describe Redde::Generators::PhotoGenerator do
  include GeneratorSpec::TestCase
  destination File.expand_path("../../../tmp", __FILE__)

  before(:all) do
    prepare_destination
    run_generator
  end

  after(:all) do
    FileUtils.rm_rf 'tmp'
  end

  it "Generates controller" do
    assert_file "app/controllers/admin/photos_controller.rb"
  end

  it "Generates views" do
    assert_directory "app/views/admin/photos"
  end

  it "Generates model" do
    assert_file "app/models/photo.rb"
  end

  it "Generates migration" do
    files = Dir["tmp/db/migrate/*.rb"]
    expect(files.map(&:to_s).join(" ").index("create_photos")).to eq 30
  end

end
{'fraction_non_alphanumeric': 0.12473572938689217, 'fraction_numerical': 0.0028188865398167725, 'mean_word_length': 3.6557377049180326, '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': '6599542', 'n_tokens_mistral': 498, 'n_tokens_neox': 474, 'n_words': 106}