Sha256: a47863650d70a90c43d0cbde0d377e490b91cfdf619d16cae720894ef65bc2e9
Contents?: true
Size: 724 Bytes
Versions: 1
Compression:
Stored size: 724 Bytes
Contents
require 'ego/robot' RSpec.describe Ego::Robot, 'with robot_io plug-in' do subject { robot_with_plugin('robot_io') } it { should be_able_to 'output text to the terminal' } describe '#verbose?' do it 'is defined on the robot instance' do expect(subject.respond_to?(:verbose?)).to be true end end it { should be_able_to 'repeat what you say' } it { should handle_query 'say hello' } it { should handle_query 'echo hello' } it { should_not handle_query 'whatever you say' } it { should_not handle_query 'there is an echo in here' } it 'prints the input' do expect { subject.handle('say hello, robot') }.to output( <<~OUT hello, robot OUT ).to_stdout end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ego-0.5.0 | spec/ego/plugins/robot_io_spec.rb |