Sha256: f0037476514d48eb0a914b8cef077990b8a429e2f2c0695768a3fbbfd165c6be

Contents?: true

Size: 522 Bytes

Versions: 3

Compression:

Stored size: 522 Bytes

Contents

require 'spec_helper'

describe Yema::Rule::Length, 'valid options' do

  subject { described_class.new(:foo, options) }

  it_behaves_like "valid options", {length: 3}
  it_behaves_like "valid options", {length: 3..4}

  it_behaves_like "invalid options", {}
  it_behaves_like "invalid options", {length: '3'}
  it_behaves_like "invalid options", {length: [3, 4]}
  it_behaves_like "invalid options", {length: 3.2}
  it_behaves_like "invalid options", {length: false}
  it_behaves_like "invalid options", {height: 3}
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
yema-0.0.3 spec/unit/rule/length/valid_options_spec.rb
yema-0.0.2 spec/unit/rule/length/valid_options_spec.rb
yema-0.0.1 spec/unit/rule/length/valid_options_spec.rb