<commit_before># require merb-gen and the spec helpers
require 'merb-gen'
require 'merb-gen/spec_helper'

# require our other spec helpers
require File.join(File.dirname(__FILE__), '..', 'spec_helper')

# require the generators
require 'generators/data_mapper_migration'
require 'generators/data_mapper_model'
require 'generators/data_mapper_resource_controller'

# include the helpers
Spec::Runner.configure do |config|
  config.include Merb::Test::GeneratorHelper
end

# copied from merb-more/merb-gen/spec/spec_helpers.rb
# 07/08/2008

shared_examples_for "named generator" do

  describe '#file_name' do

    it "should convert the name to snake case" do
      @generator.name = 'SomeMoreStuff'
      @generator.file_name.should == 'some_more_stuff'
    end

    it "should preserve dashes" do
      @generator.name = "project-pictures"
      @generator.file_name.should == "project-pictures"
    end

  end

  describe '#base_name' do

    it "should convert the name to snake case" do
      @generator.name = 'SomeMoreStuff'
      @generator.base_name.should == 'some_more_stuff'<commit_msg>[merb_dm] Templater matchers have moved<commit_after># require merb-gen and the spec helpers
require 'merb-gen'
require 'templater/spec/helpers'

# require our other spec helpers
require File.join(File.dirname(__FILE__), '..', 'spec_helper')

# require the generators
require 'generators/data_mapper_migration'
require 'generators/data_mapper_model'
require 'generators/data_mapper_resource_controller'

# include the helpers
Spec::Runner.configure do |config|
  config.include Templater::Spec::Helpers
end

# copied from merb-more/merb-gen/spec/spec_helpers.rb
# 07/08/2008

shared_examples_for "named generator" do

  describe '#file_name' do

    it "should convert the name to snake case" do
      @generator.name = 'SomeMoreStuff'
      @generator.file_name.should == 'some_more_stuff'
    end

    it "should preserve dashes" do
      @generator.name = "project-pictures"
      @generator.file_name.should == "project-pictures"
    end

  end

  describe '#base_name' do

    it "should convert the name to snake case" do
      @generator.name = 'SomeMoreStuff'
      @generator.base_name.should == 'some_more_stuff'
{'fraction_non_alphanumeric': 0.10004506534474988, 'fraction_numerical': 0.007210455159981974, 'mean_word_length': 4.298329355608592, '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': '4144587', 'n_tokens_mistral': 736, 'n_tokens_neox': 702, 'n_words': 181}