title: I am new to testing in rails. I have Capybara Test for integration But i want to know how to test Model
body: <p>This is what my current test looks like for sign up </p>
  
  <pre><code>RSpec.feature 'Users can sign Up' do
    scenario 'With Valid attributes' do
      visit '/'
      click_link 'Apply'
  
      expect(page.current_url).to eq new_user_path
  
      fill_in 'First Name', with: 'John'
      fill_in 'Last Name', with: 'Doe'
      fill_in 'Business Name', with: 'Acme Inc'
      fill_in 'Phone Number', with: '2124567890'
      fill_in 'Cell Number', with: '5202124567'
      fill_in 'Street Address', with: '212 Wise St'
      fill_in 'Apt/Suite', with: '410'
      fill_in 'City', with: 'New york'
      fill_in 'State', with: 'New York'
      fill_in 'Zip-Code', with: '11104'
      fill_in 'Tax ID', with: '12345678'
      fill_in 'SSN', with: '124000987'
      fill_in 'In Business For', with: '5'
      fill_in 'Email', with: 'test@example.com'
      fill_in 'user_password', with: 'password'
      fill_in 'user_password_confirmation', with: 'password'
      click_button 'Submit'
  
      expect(page.current_url).to eq new_user_document_path
      expect(page).to have_content 'Please Upload documents listed below.'
  
      attach_file('Upload Document', Rails.root + 'spec/support/files/file.pdf')
  
      click_button 'Apply'
  
      expect(page).to have_content 'Thank you for Applying for PetroHub account. We are currently reviewing your application, which might take upto 24hrs.'
    end
  </code></pre>
  
  <p>Now i want to test if User Creation will initiate User Document creation, like for example @user.documents.build or something. 
  The test should test if after user creation, Document creation is called and the document is assigned to the user.</p>