spec/restspec/schema/attribute_spec.rb in restspec-0.1 vs spec/restspec/schema/attribute_spec.rb in restspec-0.2
- old
+ new
@@ -12,33 +12,19 @@
it 'returns the example option' do
expect(attribute.example).to eq(example)
end
end
- describe '#can_generate_examples?' do
- subject { attribute.can_generate_examples? }
-
- context 'without the option' do
- let(:attribute) { Attribute.new(:name, type, example: 'example', :for => []) }
- it { should eq(false) }
- end
-
- context 'with the option' do
- let(:attribute) { Attribute.new(:name, type, example: 'example', :for => [:examples]) }
- it { should eq(true) }
- 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 => [:checks]) }
+ let(:attribute) { Attribute.new(:name, type, :for => [:payload]) }
it { should eq(true) }
end
end
end