<commit_before>require File.dirname(__FILE__) + '/../spec_helper'

context "The PersonController" do
  fixtures :people
  controller_name :person

  specify "should be a PersonController" do
    controller.should_be_instance_of PersonController
  end

  specify "should find all people on GET to index" do
    get 'index'
    response.should.be.success
    assigns('people').should_equal [people(:lachie)]
  end

  specify "should instantiate unsaved person record on GET to create" do
    get 'create'
    response.should_be_success
    response.should_not_be_redirect
    assigns('person').should_be_new_record
  end

  specify "should persist new person and redirect to index on POST to create" do
    post 'create', {:person => {:name => 'Aslak'}}
    Person.find_by_name('Aslak').should_not_be_nil
    response.should_be_redirect
    response.redirect_url.should_equal 'http://test.host/person'
  end
end<commit_msg>Spec wording fixes<commit_after>require File.dirname(__FILE__) + '/../spec_helper'

context "The PersonController" do
  fixtures :people
  controller_name :person

  specify "should be a PersonController" do
    controller.should_be_instance_of PersonController
  end

  specify "should find all people on GET to index" do
    get 'index'
    response.should.be.success
    assigns('people').should_equal [people(:lachie)]
  end

  specify "should create an unsaved person record on GET to create" do
    get 'create'
    response.should_be_success
    response.should_not_be_redirect
    assigns('person').should_be_new_record
  end

  specify "should persist a new person and redirect to index on POST to create" do
    post 'create', {:person => {:name => 'Aslak'}}
    Person.find_by_name('Aslak').should_not_be_nil
    response.should_be_redirect
    response.redirect_url.should_equal 'http://test.host/person'
  end
end
{'fraction_non_alphanumeric': 0.08770979967514889, 'fraction_numerical': 0.0, 'mean_word_length': 4.205633802816902, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '4153522', 'n_tokens_mistral': 565, 'n_tokens_neox': 553, 'n_words': 159}