Entries from 2014-10-12 to 1 day

RSpecでhas_manyのテストヘ(^o^)ノ

Railsでhas_manyなテストするときー こんなのをテストしたい場合 RSpec.describe Address, :type => :model do describe 'Relation' do it 'has many customers' do expect(address.customers).to match_array customers end end end まずは、FactoryGirlで…