proof_status_factory.rb revision 7c39fd3c96a55308b5f9a17c7a44e73934c388b8
159N/AFactoryGirl.define do
159N/A factory :proof_status_success, class: ProofStatus do
159N/A initialize_with { ProofStatus.find('SUC') }
159N/A end
159N/A
159N/A factory :proof_status_csa, class: ProofStatus do
159N/A initialize_with { ProofStatus.find('CSA') }
159N/A end
159N/A
159N/A factory :proof_status_open, class: ProofStatus do
159N/A initialize_with { ProofStatus.find(ProofStatus::DEFAULT_OPEN_STATUS) }
159N/A end
159N/A
159N/A factory :proof_status_proven, class: ProofStatus do
159N/A initialize_with { ProofStatus.find(ProofStatus::DEFAULT_PROVEN_STATUS) }
159N/A end
159N/A
159N/A factory :proof_status_disproven, class: ProofStatus do
159N/A initialize_with { ProofStatus.find(ProofStatus::DEFAULT_DISPROVEN_STATUS) }
159N/A end
844N/A
159N/A factory :proof_status_unknown, class: ProofStatus do
159N/A initialize_with { ProofStatus.find(ProofStatus::DEFAULT_UNKNOWN_STATUS) }
159N/A end
159N/A
159N/A factory :proof_statuses, class: Array do
618N/A skip_create
159N/A
159N/A statuses = [
844N/A { 'identifier' => ProofStatus::DEFAULT_OPEN_STATUS,
844N/A 'name' => 'Open',
159N/A 'label' => 'primary',
159N/A 'description' => 'A success value has never been established.',
159N/A 'solved' => false},
159N/A { 'identifier' => 'SUC',
159N/A 'name' => 'Success',
159N/A 'label' => 'primary',
159N/A 'description' => 'The logical data has been processed successfully.',
159N/A 'solved' => true},
159N/A { 'identifier' => ProofStatus::DEFAULT_PROVEN_STATUS,
159N/A 'name' => 'Theorem',
206N/A 'label' => 'success',
159N/A 'description' =>
159N/A ['All models of Ax are models of C.',
159N/A '- F is valid, and C is a theorem of Ax.',
159N/A '- Possible dataforms are Proofs of C from Ax.'].join("\n"),
159N/A 'solved' => true},
159N/A { 'identifier' => ProofStatus::DEFAULT_DISPROVEN_STATUS,
159N/A 'name' => 'NoConsequence',
181N/A 'label' => 'danger',
159N/A 'description' =>
159N/A ['Some interpretations are models of Ax,',
159N/A 'some models of Ax are models of C, and',
159N/A 'some models of Ax are models of ~C.',
'- F is not valid, F is satisfiable, ~F is not valid,',
'~F is satisfiable, and C is not a theorem of Ax.',
'- Possible dataforms are pairs of models,',
'one Model of Ax | C and one Model of Ax | ~C.'].join("\n"),
'solved' => true},
{ 'identifier' => ProofStatus::DEFAULT_UNKNOWN_STATUS,
'name' => 'Unknown',
'label' => 'primary',
'description' =>
'Success value unknown, and no assumption has been made.',
'solved' => false},
{ 'identifier' => 'CSA',
'name' => 'CounterSatisfiable',
'label' => 'danger',
'description' =>
['Some interpretations are models of Ax, and',
'some models of Ax are models of ~C.',
'- F is not valid, ~F is satisfiable, and C is not a theorem of Ax.',
'- Possible dataforms are Models of Ax | ~C.'].join("\n"),
'solved' => true}]
initialize_with { statuses.map { |s| ProofStatus.create(s) } }
end
end