title: testing with Rails Rspec - expected and got aren't matching
body: <p>Im quite new to Rspec with Rails. Im just trying to run some tests to see if a new user has been saved and if a name, email and password has been entered but it is not working for some reason as no tests are passing.
  I'm going by this youtube video <a href="https://www.youtube.com/watch?v=71eKcNxwxVY" rel="nofollow noreferrer">https://www.youtube.com/watch?v=71eKcNxwxVY</a>. Ive copied everything apart from i didn't use a scaffold. I made a user model myself. thanks</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>class User &lt; ApplicationRecord
    validates :name, presence: true
    validates :email, presence: true
    validates :password, presence: true
  end</code></pre>
  </div>
  </div>
  </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>rspec
  
  User
    validation tests
      ensures name presence (FAILED - 1)
      ensures email presence (FAILED - 2)
      ensures password presence (FAILED - 3)
      should save (FAILED - 4)
  
  Failures:
  
    1) User validation tests ensures name presence
       Failure/Error: expect(user).to eq()
       
       ArgumentError:
         wrong number of arguments (given 0, expected 1)
       # ./spec/models/user_spec.rb:7:in `block (3 levels) in &lt;top (required)&gt;'
  
    2) User validation tests ensures email presence
       Failure/Error: expect(user).to eq(false)
       
         expected: false
              got: #&lt;User id: nil, name: "ben", email: nil, password: "123123", created_at: nil, updated_at: nil&gt;
       
         (compared using ==)
       # ./spec/models/user_spec.rb:12:in `block (3 levels) in &lt;top (required)&gt;'
  
    3) User validation tests ensures password presence
       Failure/Error: expect(user).to eq(false)
       
         expected: false
              got: #&lt;User id: nil, name: "ben", email: "ben@ben.com", password: nil, created_at: nil, updated_at: nil&gt;
       
         (compared using ==)
       # ./spec/models/user_spec.rb:17:in `block (3 levels) in &lt;top (required)&gt;'
  
    4) User validation tests should save
       Failure/Error: expect(user).to eq(true)
       
         expected: true
              got: #&lt;User id: nil, name: "ben", email: "ben@ben.com", password: "123123", created_at: nil, updated_at: nil&gt;
       
         (compared using ==)
       
         Diff:
         @@ -1,2 +1,8 @@
         -true
         +#&lt;User:0x00007fa8efdbb628
         + id: nil,
         + name: "ben",
         + email: "ben@ben.com",
         + password: "123123",
         + created_at: nil,
         + updated_at: nil&gt;
         
       # ./spec/models/user_spec.rb:22:in `block (3 levels) in &lt;top (required)&gt;'
  
  Finished in 0.02486 seconds (files took 1.43 seconds to load)
  4 examples, 4 failures
  
  Failed examples:
  
  rspec ./spec/models/user_spec.rb:5 # User validation tests ensures name presence
  rspec ./spec/models/user_spec.rb:10 # User validation tests ensures email presence
  rspec ./spec/models/user_spec.rb:15 # User validation tests ensures password presence
  rspec ./spec/models/user_spec.rb:20 # User validation tests should save</code></pre>
  </div>
  </div>
  </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>RSpec.describe User, type: :model do
    context 'validation tests' do
      it "ensures name presence" do
          user = User.new(email: "ben@ben.com", password: "123123")
          expect(user).to eq(false)
      end
  
      it 'ensures email presence' do
          user = User.new(name:"ben", password: "123123")
          expect(user).to eq(false)
      end
  
      it 'ensures password presence' do
          user = User.new(email: "ben@ben.com", name: "ben")
          expect(user).to eq(false)
      end
  
      it 'should save' do
          user = User.new(email: "ben@ben.com", name: "ben", password: "123123")
          expect(user).to eq(true)
        end
  end
  end</code></pre>
  </div>
  </div>
  </p>