require 'spec_helper' describe Yema::Rule::Format, 'valid options' do subject { described_class.new(:foo, options) } it_behaves_like "valid options", {format: /abc/} it_behaves_like "invalid options", {} it_behaves_like "invalid options", {format: '3'} it_behaves_like "invalid options", {format: [3, 4]} it_behaves_like "invalid options", {format: 3} end