以下のようなspec.rbに対して、どのようなrbファイルを作成すればエラーなしでコンパイル可能でしょうか?
dog_spec.rb ↓↓
require 'spec_helper'
describe Dog do
let(:dog) {Dog.new}
describe '.name' do
subject { dog.name }
it { expect(subject).to ep 'tom' }
end
describe '#cries' do
subject { dog.cries }
it { expect(subject).to ep 'bark' }
end
end
spec_helper.rb ↓↓
$LOAD_PATH.unshift File.expand_path('../lib',FILE)
require 'dog'
よろしくお願い致します
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2015/05/17 13:45