require 'spec_helper' describe Yema::Rule, '.required_options' do subject { described_class.new(:foo, options) } let(:described_class) do Class.new(Yema::Rule) do def self.required_options [:length] end end end it_behaves_like "invalid options", {} it_behaves_like "invalid options", {size:24} it_behaves_like "valid options", {length: 123, size:24} end