Sha256: 539f8be7f6352ef05947aeea0d4410f8e79bad0778a643983ea88ce9609a0d0c

Contents?: true

Size: 408 Bytes

Versions: 6

Compression:

Stored size: 408 Bytes

Contents

require 'spec_helper'

module Jschematic
  module Attributes
    describe MinItems, "with a minimum of two items" do
      subject { MinItems.new(2) }

      describe "#accepts?" do
        it { should     accept([1,2])                           }
        it { should_not accept([1])                             }
        it { should     accept("instance that is not an array") }
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
jschematic-0.1.0 spec/jschematic/attributes/min_items_spec.rb
jschematic-0.0.9 spec/jschematic/attributes/min_items_spec.rb
jschematic-0.0.6 spec/jschematic/attributes/min_items_spec.rb
jschematic-0.0.5 spec/jschematic/attributes/min_items_spec.rb
jschematic-0.0.2 spec/jschematic/attributes/min_items_spec.rb
jschematic-0.0.1 spec/jschematic/attributes/min_items_spec.rb