end\r
\r
module LeafMacros\r
- # ぶら下がるそれぞれのリーフを取得\r
- def define_leaf_items? item, leaf_models\r
- expect(item.respond_to?(:leaf_items)).to be true\r
- leaf_models.each do |model|\r
- expect(item.leaf_items(model)).to_not be_empty\r
- expect(item.leaf_items(model).first.class).to eq model\r
- end\r
- end\r
- \r
- def define_leafs_items? item, leaf_models\r
- expect(item.respond_to?(:leafs_items)).to be true\r
- expect(item.leafs_items).to_not be_empty\r
- item.leafs_items.map {|i| i.class }.each do |model|\r
- expect(leaf_models).to include model\r
- end\r
+ def define_test item\r
+ expect {expect(item.new_t(0))}.not_to raise_error\r
end\r
\r
end\r