こんなエラーになりました。
spec/models/address_purchase_spec.rb
% bundle exec rspec spec/models/address_purchase_spec.rb
An error occurred while loading ./spec/models/address_purchase_spec.rb.
Failure/Error:
RSpec.describe AddressPurchase, type: :model do
describe '商品購入テスト' do
before do
# @address_purchase = FactoryBot.build(:address_purchase)
end
it 'すべての値が正しく入力されていれば保存できること' do
end
it '郵便番号が空だと保存できないこと' do
@address_purchase.postal_code = ''
NameError:
uninitialized constant AddressPurchase
# ./spec/models/address_purchase_spec.rb:2:in `<top (required)>'
No examples found.
ちなみにrequire 'rails_helper'は
のrails_helper.rbを読みにいっています。