Sha256: e368dceb4b497d7039ec64c2955df1e64eccd74f9d2c4bf6e14b2cee119971b3
Contents?: true
Size: 527 Bytes
Versions: 3
Compression:
Stored size: 527 Bytes
Contents
require 'spec_helper' describe Yema::Rule::Format, '#errors' do subject { rule.errors(resource) } let(:rule) { described_class.new(attribute, options) } let(:resource) { stub('resource', attribute => value) } let(:attribute) { :foo } let(:options) { { format: /foo/ } } [ 'foo', 'afoo', 'fooa', 'afooa', ].each do |value| it_behaves_like "valid resource", value end it_behaves_like "invalid resource", 'abcdds' end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
yema-0.0.3 | spec/integration/rule/format_spec.rb |
yema-0.0.2 | spec/integration/rule/format_spec.rb |
yema-0.0.1 | spec/integration/rule/format_spec.rb |