Lines Matching refs:state
4 context 'single proof attempt from pending state' do
5 let(:proof_attempt) { create :proof_attempt, state: 'pending' }
8 %i(done failed processing).each do |state|
9 context "to #{state}" do
10 let(:pesu) { ProofEvaluationStateUpdater.new(proof_attempt, state) }
13 it "update the state to #{state}" do
14 expect(proof_attempt.state).to eq(state.to_s)
17 it "theorem is #{state}" do
18 expect(theorem.state).to eq(state.to_s)
24 context 'many proof attempts all from pending state' do
25 # All examples here simulate the state machine of the state-changes.
26 # We only check the following state changes
32 let!(:proof_attempt1) { create :proof_attempt, state: 'pending' }
34 let!(:proof_attempt2) { create :proof_attempt, theorem: theorem, state: 'pending' }
37 %w(pending processing done).each do |state|
38 context "last #{state}" do
40 let(:pesu22) { ProofEvaluationStateUpdater.new(proof_attempt2, state) }
43 it "theorem is #{state}" do
44 expect(theorem.state).to eq(state)
49 %w(failed no_result).each do |state|
50 context "last #{state}" do
52 let(:pesu22) { ProofEvaluationStateUpdater.new(proof_attempt2, state) }
56 expect(theorem.state).to eq('pending')
66 %w(processing done).each do |state|
67 context "last #{state}" do
69 let(:pesu22) { ProofEvaluationStateUpdater.new(proof_attempt2, state) }
72 it "theorem is #{state}" do
73 expect(theorem.state).to eq(state)
78 %w(failed no_result pending).each do |state|
79 context "last #{state}" do
81 let(:pesu22) { ProofEvaluationStateUpdater.new(proof_attempt2, state) }
85 expect(theorem.state).to eq('processing')
96 %w(done).each do |state|
97 context "last #{state}" do
99 let(:pesu22) { ProofEvaluationStateUpdater.new(proof_attempt2, state) }
102 it "theorem is #{state}" do
103 expect(theorem.state).to eq(state)
108 %w(failed no_result pending processing).each do |state|
109 context "last #{state}" do
111 let(:pesu22) { ProofEvaluationStateUpdater.new(proof_attempt2, state) }
115 expect(theorem.state).to eq('done')
126 %w(no_result pending processing done).each do |state|
127 context "last #{state}" do
129 let(:pesu22) { ProofEvaluationStateUpdater.new(proof_attempt2, state) }
132 it "theorem is #{state}" do
133 expect(theorem.state).to eq(state)
138 %w(failed).each do |state|
139 context "last #{state}" do
141 let(:pesu22) { ProofEvaluationStateUpdater.new(proof_attempt2, state) }
145 expect(theorem.state).to eq('failed')
156 %w(no_result pending processing done).each do |state|
157 context "last #{state}" do
159 let(:pesu22) { ProofEvaluationStateUpdater.new(proof_attempt2, state) }
162 it "theorem is #{state}" do
163 expect(theorem.state).to eq(state)
168 %w(failed).each do |state|
169 context "last #{state}" do
171 let(:pesu22) { ProofEvaluationStateUpdater.new(proof_attempt2, state) }
175 expect(theorem.state).to eq('no_result')