Sha256: 22577fc8d82c297c73795e02cbb4c4db3c10ea464a702e1d1c0590d45c57af8c
Contents?: true
Size: 693 Bytes
Versions: 10
Compression:
Stored size: 693 Bytes
Contents
require 'spec_helper' include Restspec::Schema describe Attribute do let(:type) { double } describe '#example' do let(:example) { 'example' } let(:attribute) { Attribute.new(:name, type, example: example) } it 'returns the example option' do expect(attribute.example).to eq(example) end end describe '#can_be_checked?' do subject { attribute.can_be_checked? } context 'without the option' do let(:attribute) { Attribute.new(:name, type, :for => []) } it { should eq(false) } end context 'with the option' do let(:attribute) { Attribute.new(:name, type, :for => [:payload]) } it { should eq(true) } end end end
Version data entries
10 entries across 10 versions & 1 rubygems