私のビュー仕様では、次のものがあります
require 'spec_helper'
describe "my_project/index.html.erb" do
it "displays the Country drop down" do
render
rendered.should contain("Country")
end
end
しかし、仕様を実行すると、次のエラーが発生します
Failure/Error: render
ActionView::Template::Error:
undefined method `map' for nil:NilClass
ページに実際にテキストが含まれているのに、なぜこのエラーが発生するのか混乱しています。