下記のrspecファイルをエラーなしで実行するには、
どのようなrbファイルを作成すればよろしいでしょうか?
#---start---
require 'spec_helper'
describe Animal do
context 'initialize' do
let(:animal) {Animal.new}
describe '.name' do
subject { animal.name }
it { expect(subject).to be_nil }
end
describe '.type' do
subject { animal.type }
it { expect(subject).to be_nil }
end
describe '#cries' do
subject { animal.cries }
it { expect(subject).to be_nil }
end
end
end
#---end---
spec_helper.rb
#---start---
$LOAD_PATH.unshift File.expand_path('../lib',FILE)
require 'animal'
#---end---
よろしくお願い致します。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2015/06/25 02:07
2015/06/25 14:43