Sha256: 8c0077533e0b01434eb2248dcd7167b1f97883f9d94b09dc4f9c47a25a9b9f0b
Contents?: true
Size: 1.11 KB
Versions: 38
Compression:
Stored size: 1.11 KB
Contents
require 'spec_helper' describe Metasploit::Model::Search::Operation::Boolean do context 'CONSTANTS' do context 'FORMATTED_VALUE_TO_VALUE' do subject(:formatted_value_to_value) do described_class::FORMATTED_VALUE_TO_VALUE end its(['false']) { should be_false } its(['true']) { should be_true } end end context 'validations' do it { should allow_value(false).for(:value) } it { should allow_value(true).for(:value) } it { should_not allow_value(nil).for(:value) } end context '#value' do subject(:value) do operation.value end let(:operation) do described_class.new(:value => formatted_value) end context "with 'false'" do let(:formatted_value) do 'false' end it { should be_false } end context "with 'true'" do let(:formatted_value) do 'true' end it { should be_true } end context 'with other' do let(:formatted_value) do 'unknown' end it 'should return value unparsed' do value.should == formatted_value end end end end
Version data entries
38 entries across 38 versions & 1 rubygems