<commit_before>require 'rails_helper'

RSpec.describe TasksController, type: :controller do
  render_views

  describe "GET #index" do
    it "returns http success" do
      get :index
      expect(response).to have_http_status(:success)
    end
  end

  describe "POST #create" do
    it "returns http success" do
      expect do
        params = {
          task: {
            created: false,
            description: "then iterate on it",
            name: "Write a Todo App",
          },
        }
        post :create, params
        expect(response).to redirect_to(:tasks)
      end.to change { Task.count }.by(1)
    end
  end
end<commit_msg>Update spec call to rails 5 style.<commit_after>require 'rails_helper'

RSpec.describe TasksController, type: :controller do
  render_views

  describe "GET #index" do
    it "returns http success" do
      get :index
      expect(response).to have_http_status(:success)
    end
  end

  describe "POST #create" do
    it "returns http success" do
      expect do
        params = {
          task: {
            created: false,
            description: "then iterate on it",
            name: "Write a Todo App",
          },
        }
        post :create, params: params
        expect(response).to redirect_to(:tasks)
      end.to change { Task.count }.by(1)
    end
  end
end
{'fraction_non_alphanumeric': 0.08865514650638617, 'fraction_numerical': 0.002253944402704733, 'mean_word_length': 2.07621247113164, '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': '6528449', 'n_tokens_mistral': 395, 'n_tokens_neox': 382, 'n_words': 126}