<commit_before>require 'rails_helper'

describe 'member' do
  context 'valid member' do
    let!(:member) { FactoryBot.create(:member, login_name: 'hinemoa') }

    describe 'should be fetchable from the database' do
      subject { Member.find(member.id) }
      it { is_expected.to be_an_instance_of Member }
      it { expect(subject.encrypted_password).not_to be_nil }
    end

    describe 'should have a friendly slug' do
      it { expect(member.slug).to eq('hinemoa') }
    end

    it 'has a bio' do
      member.bio = 'I love seeds'
      expect(member.bio).to eq 'I love seeds'
    end

    it 'should have a default garden' do
      expect(member.gardens.count).to eq 1
    end

    it 'should have a accounts entry' do
      expect(member.account).to be_an_instance_of Account
    end

    it "should have a default-type account by default" do
      member.account.account_type.name.should eq Rails.application.config.default_account_type
      expect(member.paid?).to be_false
    end

    it "doesn't show email by default" do
      expect(member.show_email).to be_false
    end

    it 'should stringify as the login_name' do
      expect(member.to_s).to eq 'hinemoa'
    end

    it 'should be able to fetch posts' do
      post = FactoryBot.create(:post, author: member)
      expect(member.posts).to eq [post]
    end

    it 'should be able to fetch gardens' do
      expect(member.gardens.first.name).to eq "Garden"
    end

    it 'has many plantings' do<commit_msg>Look for eq false in member spec<commit_after>require 'rails_helper'

describe 'member' do
  context 'valid member' do
    let!(:member) { FactoryBot.create(:member, login_name: 'hinemoa') }

    describe 'should be fetchable from the database' do
      subject { Member.find(member.id) }
      it { is_expected.to be_an_instance_of Member }
      it { expect(subject.encrypted_password).not_to be_nil }
    end

    describe 'should have a friendly slug' do
      it { expect(member.slug).to eq('hinemoa') }
    end

    it 'has a bio' do
      member.bio = 'I love seeds'
      expect(member.bio).to eq 'I love seeds'
    end

    it 'should have a default garden' do
      expect(member.gardens.count).to eq 1
    end

    it 'should have a accounts entry' do
      expect(member.account).to be_an_instance_of Account
    end

    it "should have a default-type account by default" do
      member.account.account_type.name.should eq Rails.application.config.default_account_type
      expect(member.paid?).to eq false
    end

    it "doesn't show email by default" do
      expect(member.show_email).to eq false
    end

    it 'should stringify as the login_name' do
      expect(member.to_s).to eq 'hinemoa'
    end

    it 'should be able to fetch posts' do
      post = FactoryBot.create(:post, author: member)
      expect(member.posts).to eq [post]
    end

    it 'should be able to fetch gardens' do
      expect(member.gardens.first.name).to eq "Garden"
    end

    it 'has many plantings' do
{'fraction_non_alphanumeric': 0.08948247078464107, 'fraction_numerical': 0.000667779632721202, 'mean_word_length': 2.81656050955414, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '90789', 'n_tokens_mistral': 957, 'n_tokens_neox': 916, 'n_words': 303}