summaryrefslogtreecommitdiff
path: root/spec/logic/cartridge/tools_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/logic/cartridge/tools_spec.rb')
-rw-r--r--spec/logic/cartridge/tools_spec.rb58
1 files changed, 29 insertions, 29 deletions
diff --git a/spec/logic/cartridge/tools_spec.rb b/spec/logic/cartridge/tools_spec.rb
index 42b8c57..913fa62 100644
--- a/spec/logic/cartridge/tools_spec.rb
+++ b/spec/logic/cartridge/tools_spec.rb
@@ -10,11 +10,11 @@ RSpec.describe NanoBot::Logic::Cartridge::Tools do
let(:cartridge) { {} }
it 'uses default values when appropriate' do
- expect(described_class.feedback?(cartridge, :repl, :call)).to be(true)
- expect(described_class.feedback?(cartridge, :eval, :call)).to be(true)
+ expect(described_class.feedback?(cartridge, :repl, :executing)).to be(true)
+ expect(described_class.feedback?(cartridge, :eval, :executing)).to be(true)
- expect(described_class.feedback?(cartridge, :repl, :response)).to be(false)
- expect(described_class.feedback?(cartridge, :eval, :response)).to be(false)
+ expect(described_class.feedback?(cartridge, :repl, :responding)).to be(false)
+ expect(described_class.feedback?(cartridge, :eval, :responding)).to be(false)
end
end
@@ -24,11 +24,11 @@ RSpec.describe NanoBot::Logic::Cartridge::Tools do
end
it 'overrides default values when appropriate' do
- expect(described_class.feedback?(cartridge, :repl, :call)).to be(false)
- expect(described_class.feedback?(cartridge, :eval, :call)).to be(false)
+ expect(described_class.feedback?(cartridge, :repl, :executing)).to be(false)
+ expect(described_class.feedback?(cartridge, :eval, :executing)).to be(false)
- expect(described_class.feedback?(cartridge, :repl, :response)).to be(false)
- expect(described_class.feedback?(cartridge, :eval, :response)).to be(false)
+ expect(described_class.feedback?(cartridge, :repl, :responding)).to be(false)
+ expect(described_class.feedback?(cartridge, :eval, :responding)).to be(false)
end
end
@@ -38,59 +38,59 @@ RSpec.describe NanoBot::Logic::Cartridge::Tools do
end
it 'overrides default values when appropriate' do
- expect(described_class.feedback?(cartridge, :repl, :call)).to be(true)
- expect(described_class.feedback?(cartridge, :eval, :call)).to be(true)
+ expect(described_class.feedback?(cartridge, :repl, :executing)).to be(true)
+ expect(described_class.feedback?(cartridge, :eval, :executing)).to be(true)
- expect(described_class.feedback?(cartridge, :repl, :response)).to be(true)
- expect(described_class.feedback?(cartridge, :eval, :response)).to be(true)
+ expect(described_class.feedback?(cartridge, :repl, :responding)).to be(true)
+ expect(described_class.feedback?(cartridge, :eval, :responding)).to be(true)
end
end
context 'top-level-specific overrides' do
let(:cartridge) do
- { interfaces: { tools: { call: { feedback: false }, response: { feedback: true } } } }
+ { interfaces: { tools: { executing: { feedback: false }, responding: { feedback: true } } } }
end
it 'overrides default values when appropriate' do
- expect(described_class.feedback?(cartridge, :repl, :call)).to be(false)
- expect(described_class.feedback?(cartridge, :eval, :call)).to be(false)
+ expect(described_class.feedback?(cartridge, :repl, :executing)).to be(false)
+ expect(described_class.feedback?(cartridge, :eval, :executing)).to be(false)
- expect(described_class.feedback?(cartridge, :repl, :response)).to be(true)
- expect(described_class.feedback?(cartridge, :eval, :response)).to be(true)
+ expect(described_class.feedback?(cartridge, :repl, :responding)).to be(true)
+ expect(described_class.feedback?(cartridge, :eval, :responding)).to be(true)
end
end
context 'repl interface overrides' do
let(:cartridge) do
{ interfaces: {
- tools: { call: { feedback: false }, response: { feedback: true } },
- repl: { tools: { call: { feedback: true }, response: { feedback: false } } }
+ tools: { executing: { feedback: false }, responding: { feedback: true } },
+ repl: { tools: { executing: { feedback: true }, responding: { feedback: false } } }
} }
end
it 'overrides default values when appropriate' do
- expect(described_class.feedback?(cartridge, :repl, :call)).to be(true)
- expect(described_class.feedback?(cartridge, :eval, :call)).to be(false)
+ expect(described_class.feedback?(cartridge, :repl, :executing)).to be(true)
+ expect(described_class.feedback?(cartridge, :eval, :executing)).to be(false)
- expect(described_class.feedback?(cartridge, :repl, :response)).to be(false)
- expect(described_class.feedback?(cartridge, :eval, :response)).to be(true)
+ expect(described_class.feedback?(cartridge, :repl, :responding)).to be(false)
+ expect(described_class.feedback?(cartridge, :eval, :responding)).to be(true)
end
end
context 'eval interface overrides' do
let(:cartridge) do
{ interfaces: {
- tools: { call: { feedback: false }, response: { feedback: true } },
- eval: { tools: { call: { feedback: true }, response: { feedback: false } } }
+ tools: { executing: { feedback: false }, responding: { feedback: true } },
+ eval: { tools: { executing: { feedback: true }, responding: { feedback: false } } }
} }
end
it 'overrides default values when appropriate' do
- expect(described_class.feedback?(cartridge, :repl, :call)).to be(false)
- expect(described_class.feedback?(cartridge, :eval, :call)).to be(true)
+ expect(described_class.feedback?(cartridge, :repl, :executing)).to be(false)
+ expect(described_class.feedback?(cartridge, :eval, :executing)).to be(true)
- expect(described_class.feedback?(cartridge, :repl, :response)).to be(true)
- expect(described_class.feedback?(cartridge, :eval, :response)).to be(false)
+ expect(described_class.feedback?(cartridge, :repl, :responding)).to be(true)
+ expect(described_class.feedback?(cartridge, :eval, :responding)).to be(false)
end
end
end