Refactor factory girl usage in specs
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
describe Sound do
|
||||
subject { sound }
|
||||
let(:sound) { FactoryGirl.build(:sound) }
|
||||
let(:sound) { build :sound }
|
||||
|
||||
it { is_expected.to be_valid }
|
||||
it { is_expected.to belong_to :track }
|
||||
@@ -19,7 +19,7 @@ describe Sound do
|
||||
end
|
||||
|
||||
describe '#file=' do
|
||||
let(:file) { FactoryGirl.attributes_for(:sound)[:file] }
|
||||
let(:file) { attributes_for(:sound)[:file] }
|
||||
|
||||
it 'saves the file SHA256 digest' do
|
||||
expect(sound.sha256).to eq Digest::SHA256.file(file.path).hexdigest
|
||||
|
Reference in New Issue
Block a user