<commit_before>require "rails_helper"

<% module_namespacing do -%>
RSpec.describe <%= controller_class_name %>Controller, <%= type_metatag(:routing) %> do
  describe "routing" do

<% unless options[:singleton] -%>
    it "routes to #index" do
      expect(:get => "/<%= ns_table_name %>").to route_to("<%= ns_table_name %>#index")
    end
    
<% end -%>
<% unless options[:api] -%>
    it "routes to #new" do
      expect(:get => "/<%= ns_table_name %>/new").to route_to("<%= ns_table_name %>#new")
    end
  
<% end -%>
    it "routes to #show" do
      expect(:get => "/<%= ns_table_name %>/1").to route_to("<%= ns_table_name %>#show", :id => "1")
    end

<% unless options[:api] -%>
    it "routes to #edit" do
      expect(:get => "/<%= ns_table_name %>/1/edit").to route_to("<%= ns_table_name %>#edit", :id => "1")
    end

<% end -%>

    it "routes to #create" do
      expect(:post => "/<%= ns_table_name %>").to route_to("<%= ns_table_name %>#create")
    end

    it "routes to #update via PUT" do
      expect(:put => "/<%= ns_table_name %>/1").to route_to("<%= ns_table_name %>#update", :id => "1")
    end

<% if Rails::VERSION::STRING > '4' -%><commit_msg>Remove starting new line after describe block<commit_after>require "rails_helper"

<% module_namespacing do -%>
RSpec.describe <%= controller_class_name %>Controller, <%= type_metatag(:routing) %> do
  describe "routing" do
<% unless options[:singleton] -%>
    it "routes to #index" do
      expect(:get => "/<%= ns_table_name %>").to route_to("<%= ns_table_name %>#index")
    end

<% end -%>
<% unless options[:api] -%>
    it "routes to #new" do
      expect(:get => "/<%= ns_table_name %>/new").to route_to("<%= ns_table_name %>#new")
    end

<% end -%>
    it "routes to #show" do
      expect(:get => "/<%= ns_table_name %>/1").to route_to("<%= ns_table_name %>#show", :id => "1")
    end

<% unless options[:api] -%>
    it "routes to #edit" do
      expect(:get => "/<%= ns_table_name %>/1/edit").to route_to("<%= ns_table_name %>#edit", :id => "1")
    end

<% end -%>

    it "routes to #create" do
      expect(:post => "/<%= ns_table_name %>").to route_to("<%= ns_table_name %>#create")
    end

    it "routes to #update via PUT" do
      expect(:put => "/<%= ns_table_name %>/1").to route_to("<%= ns_table_name %>#update", :id => "1")
    end

<% if Rails::VERSION::STRING > '4' -%>
{'fraction_non_alphanumeric': 0.22184732180514552, 'fraction_numerical': 0.005904681568958245, 'mean_word_length': 3.4754716981132074, 'pattern_counts': {'":': 0, '<': 47, '<?xml version=': 0, '>': 67, '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': '252443', 'n_tokens_mistral': 931, 'n_tokens_neox': 868, 'n_words': 214}