c4bdc37c9de27abfa1d5be18008953b32457e6c4Eugen Kuksarequire 'spec_helper'
c4bdc37c9de27abfa1d5be18008953b32457e6c4Eugen Kuksa
c4bdc37c9de27abfa1d5be18008953b32457e6c4Eugen Kuksadescribe ProofAttemptConfiguration do
c4bdc37c9de27abfa1d5be18008953b32457e6c4Eugen Kuksa context 'Associations' do
c4bdc37c9de27abfa1d5be18008953b32457e6c4Eugen Kuksa it { should belong_to(:prover) }
c4bdc37c9de27abfa1d5be18008953b32457e6c4Eugen Kuksa it { should belong_to(:logic_mapping) }
b56109f8183ec717e6760a8562b5d97a8540f55fEugen Kuksa it { should belong_to(:axiom_selection) }
63499d8d12a219d26744bcb896789ea28459814fEugen Kuksa it { should have_one(:proof_attempt) }
c4bdc37c9de27abfa1d5be18008953b32457e6c4Eugen Kuksa end
6e7a0ef4c702f2ae2a8c31c8e0436949fb6808d8Eugen Kuksa
6e7a0ef4c702f2ae2a8c31c8e0436949fb6808d8Eugen Kuksa context 'Methods' do
6e7a0ef4c702f2ae2a8c31c8e0436949fb6808d8Eugen Kuksa let(:proof_attempt) { create :proof_attempt }
6e7a0ef4c702f2ae2a8c31c8e0436949fb6808d8Eugen Kuksa let(:proof_attempt_configuration) do
6e7a0ef4c702f2ae2a8c31c8e0436949fb6808d8Eugen Kuksa proof_attempt.proof_attempt_configuration
6e7a0ef4c702f2ae2a8c31c8e0436949fb6808d8Eugen Kuksa end
6e7a0ef4c702f2ae2a8c31c8e0436949fb6808d8Eugen Kuksa subject { proof_attempt_configuration }
6e7a0ef4c702f2ae2a8c31c8e0436949fb6808d8Eugen Kuksa
6e7a0ef4c702f2ae2a8c31c8e0436949fb6808d8Eugen Kuksa context 'empty?' do
6e7a0ef4c702f2ae2a8c31c8e0436949fb6808d8Eugen Kuksa before do
6e7a0ef4c702f2ae2a8c31c8e0436949fb6808d8Eugen Kuksa subject.timeout = nil
6e7a0ef4c702f2ae2a8c31c8e0436949fb6808d8Eugen Kuksa subject.logic_mapping = nil
6e7a0ef4c702f2ae2a8c31c8e0436949fb6808d8Eugen Kuksa subject.prover = nil
6e7a0ef4c702f2ae2a8c31c8e0436949fb6808d8Eugen Kuksa subject.axiom_selection.axioms = []
6e7a0ef4c702f2ae2a8c31c8e0436949fb6808d8Eugen Kuksa end
6e7a0ef4c702f2ae2a8c31c8e0436949fb6808d8Eugen Kuksa
6e7a0ef4c702f2ae2a8c31c8e0436949fb6808d8Eugen Kuksa it 'empty proof attempt configuration' do
6e7a0ef4c702f2ae2a8c31c8e0436949fb6808d8Eugen Kuksa expect(subject.empty?).to be(true)
6e7a0ef4c702f2ae2a8c31c8e0436949fb6808d8Eugen Kuksa end
6e7a0ef4c702f2ae2a8c31c8e0436949fb6808d8Eugen Kuksa
6e7a0ef4c702f2ae2a8c31c8e0436949fb6808d8Eugen Kuksa it 'with timeout set' do
6e7a0ef4c702f2ae2a8c31c8e0436949fb6808d8Eugen Kuksa subject.timeout = 1
6e7a0ef4c702f2ae2a8c31c8e0436949fb6808d8Eugen Kuksa expect(subject.empty?).to be(false)
6e7a0ef4c702f2ae2a8c31c8e0436949fb6808d8Eugen Kuksa end
6e7a0ef4c702f2ae2a8c31c8e0436949fb6808d8Eugen Kuksa
6e7a0ef4c702f2ae2a8c31c8e0436949fb6808d8Eugen Kuksa it 'with logic_mapping set' do
6e7a0ef4c702f2ae2a8c31c8e0436949fb6808d8Eugen Kuksa subject.logic_mapping = LogicMapping.first
6e7a0ef4c702f2ae2a8c31c8e0436949fb6808d8Eugen Kuksa expect(subject.empty?).to be(false)
6e7a0ef4c702f2ae2a8c31c8e0436949fb6808d8Eugen Kuksa end
6e7a0ef4c702f2ae2a8c31c8e0436949fb6808d8Eugen Kuksa
6e7a0ef4c702f2ae2a8c31c8e0436949fb6808d8Eugen Kuksa it 'with prover set' do
6e7a0ef4c702f2ae2a8c31c8e0436949fb6808d8Eugen Kuksa subject.prover = Prover.first
6e7a0ef4c702f2ae2a8c31c8e0436949fb6808d8Eugen Kuksa expect(subject.empty?).to be(false)
6e7a0ef4c702f2ae2a8c31c8e0436949fb6808d8Eugen Kuksa end
6e7a0ef4c702f2ae2a8c31c8e0436949fb6808d8Eugen Kuksa
6e7a0ef4c702f2ae2a8c31c8e0436949fb6808d8Eugen Kuksa it 'with axiom_selection set' do
6e7a0ef4c702f2ae2a8c31c8e0436949fb6808d8Eugen Kuksa create :axiom
6e7a0ef4c702f2ae2a8c31c8e0436949fb6808d8Eugen Kuksa subject.axiom_selection.axioms = [Axiom.first]
6e7a0ef4c702f2ae2a8c31c8e0436949fb6808d8Eugen Kuksa expect(subject.empty?).to be(false)
6e7a0ef4c702f2ae2a8c31c8e0436949fb6808d8Eugen Kuksa end
6e7a0ef4c702f2ae2a8c31c8e0436949fb6808d8Eugen Kuksa end
6e7a0ef4c702f2ae2a8c31c8e0436949fb6808d8Eugen Kuksa end
c4bdc37c9de27abfa1d5be18008953b32457e6c4Eugen Kuksaend