spec/01_cli_spec.rb in stock-gains-0.1.7 vs spec/01_cli_spec.rb in stock-gains-0.1.8
- old
+ new
@@ -21,6 +21,13 @@
it 'is false when the input is invalid' do
expect(cli.valid_input?(["0"])).to be_falsey
expect(cli.valid_input?(["none"])).to be_falsey
end
end
+
+ describe 'user inputs' do
+ it 'responds to "e"' do
+ expect(self).to receive(:gets).and_return('e')
+ expect {cli.start}.to output(/Goodbye!/).to_stdout
+ end
+ end
end
\ No newline at end of file