<commit_before>require 'rails-helper'

describe Review do
  let!(:user) { User.new(name: "Boys", username: "Boys", password: "<PASSWORD>") }
  let!(:movie) { Movie.new(title: "Jaws", runtime: 90, synopsis: "It's about a shark") }
  let!(:review) { Review.new(body: "It was Okay", score: 5, movie: movie, user: user) }

  it "Is valid when all parts are assigned" do
    expect(review.valid?).to eq(true)
  end


end
<commit_msg>Added more Rspec model tests<commit_after>require 'rails_helper'

describe Review do
  let!(:user) { User.new(name: "Boys", username: "Boys", password: "<PASSWORD>") }
  let!(:movie) { Movie.new(title: "Jaws", runtime: 90, synopsis: "It's about a shark") }
  let!(:review) { Review.new(body: "It was Okay", score: 5, movie: movie, user: user) }

  it "Is valid when all parts are assigned" do
    expect(review.valid?).to eq(true)
  end

  it "Is invalid when missing a body" do
    review.body = nil
    expect(review.valid?).to eq(false)
  end

  it "Is invalid when score is less than 0" do
    review.score = -1
    expect(review.valid?).to eq(false)
  end

  it "Is invalid when score is greater than 10" do
    review.score = 11
    expect(review.valid?).to eq(false)
  end

end

{'fraction_non_alphanumeric': 0.14921681780708987, 'fraction_numerical': 0.00989282769991756, 'mean_word_length': 3.856, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '1522847', 'n_tokens_mistral': 444, 'n_tokens_neox': 413, 'n_words': 139}