Cross Reference: axiom_selection_spec.rb
xref
: /
ontohub
/
spec
/
models
/
axiom_selection_spec.rb
Home
History
Annotate
Line#
Navigate
Download
Search
only in
./
axiom_selection_spec.rb revision d1c88b94cae4567bdbd23fc952268a0217e940f7
require
'spec_helper'
describe
AxiomSelection
do
let
(:
pa
)
{
create
:
proof_attempt
}
let
(:
pac
)
{
pa.proof
_attempt_configuration
}
let
(:
axiom_selection
)
{
pac.axiom
_selection
}
subject
{
axiom_selection
}
context
'associations'
do
it
{
expect
(
subject
)
.
to
have_many
(:
proof_attempt_configurations
)
}
it
{
expect
(
subject
)
.
to
have_and_belong_to_many
(:
axioms
)
}
end
context
"methods that don't return nil"
do
%i
(
goal
ontology
)
.
each
do
|
method
|
it
method
do
expect
(
subject.send
(
method
)
)
.
not_to
be
(
nil
)
end
end
end
context
'lock_key'
do
it
'is correct'
do
expect
(
subject.lock
_key
)
.
to
eq
(
"axiom-selection-#{
subject.id
}"
)
end
end
end