# encoding: utf-8 describe <%= policy.type %> do # The specification checks whether the policy object is valid or not, # depending on values of its attributes. # default attributes for a valid policy <% attributes.each do |item| -%> # let(:<%= item %>) { @todo } <% end -%> subject { described_class.new <%= attributes.join(", ") %> } context "when @todo: describe the context" do it { is_expected.to be_valid } end # context <% attributes.each do |item| -%> context "when <%= item %> @todo" do # let(:<%= item %>) { @todo } it { is_expected.not_to be_valid } end # context <% end -%> end # describe <%= policy.type %>