diff options
author | icebaker <icebaker@proton.me> | 2023-11-19 13:35:54 -0300 |
---|---|---|
committer | icebaker <icebaker@proton.me> | 2023-11-19 13:35:54 -0300 |
commit | e89a1d57c49c94c16c37a8ee3a69b52a9e2b341b (patch) | |
tree | e82a7579534003f02de32d058f4a60d1d076240c /spec/logic/cartridge | |
parent | c470d63b169058d81f44569a5f1c4c1fb222279f (diff) |
improving tool specifications
Diffstat (limited to 'spec/logic/cartridge')
-rw-r--r-- | spec/logic/cartridge/tools_spec.rb | 58 |
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 |