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

describe "/locations/show.html.erb" do
  include LocationsHelper
  
  before(:each) do
    @location = mock_model(Location, Location.valid_options)

    assigns[:location] = @location
  end

  it "should render attributes in <p>" do
    render "/locations/show.html.erb"
    response.should have_text(/#{@location.name}/)
    response.should have_text(/#{@location.type.name}/)
    response.should have_text(/#{@location.type_id}/)
    response.should have_text(/#{@location.street_address}/)
    response.should have_text(/#{@location.city}/)
    response.should have_text(/#{@location.state}/)
    response.should have_text(/#{@location.zip_code}/)
    response.should have_text(/#{@location.phone_number}/)
    response.should have_text(/#{@location.lat}/)
    response.should have_text(/#{@location.lng}/)<commit_msg>Correcting type behavior in test<commit_after>require File.dirname(__FILE__) + '/../../spec_helper'

describe "/locations/show.html.erb" do
  include LocationsHelper
  
  before(:each) do
    @location = mock_model(Location, Location.valid_options)
    @location.stub!(:type).and_return(mock_model(Type, :name => "Foo"))

    assigns[:location] = @location
  end

  it "should render attributes in <p>" do
    render "/locations/show.html.erb"
    response.should have_text(/#{@location.name}/)
    response.should have_text(/#{@location.type.name}/)
    response.should have_text(/#{@location.type_id}/)
    response.should have_text(/#{@location.street_address}/)
    response.should have_text(/#{@location.city}/)
    response.should have_text(/#{@location.state}/)
    response.should have_text(/#{@location.zip_code}/)
    response.should have_text(/#{@location.phone_number}/)
    response.should have_text(/#{@location.lat}/)
    response.should have_text(/#{@location.lng}/)
{'fraction_non_alphanumeric': 0.16604378003203418, 'fraction_numerical': 0.0, 'mean_word_length': 4.249299719887955, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 6, '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': '3619643', 'n_tokens_mistral': 600, 'n_tokens_neox': 605, 'n_words': 96}