Cross Reference: proof_attempt_spec.rb
xref
: /
ontohub
/
spec
/
models
/
proof_attempt_spec.rb
Home
History
Annotate
Line#
Navigate
Download
Search
only in
./
proof_attempt_spec.rb revision 4a7c98053955ca61668ed12b235ddf2fc9976142
require
'spec_helper'
describe
ProofAttempt
do
context
'Associations'
do
it
{
should
belong_to
(:
theorem
)
}
it
{
should
belong_to
(:
proof_status
)
}
it
{
should
belong_to
(:
proof_attempt_configuration
)
}
it
{
should
have_one
(:
prover_output
)
}
end
let
(:
proof_attempt
)
{
create
:
proof_attempt
}
context
'Updating Theorem Proof Status'
do
let
(:
proven
)
{
create
:
proof_status_proven
}
let
(:
theorem
)
{
proof_attempt.theorem
}
before
do
allow
(
theorem
)
.
to
receive
(:
update_proof_status
)
proof_attempt.proof
_status
=
proven
proof_attempt.save
!
end
it
'calls update_status on the theorem'
do
expect
(
theorem
)
.
to
have_received
(:
update_proof_status
)
end
end
context
'state'
do
it
"is 'pending'"
do
expect
(
proof_attempt.state
)
.
to
eq
(
'pending'
)
end
end
end