test/cli_message_test.rb in sifttter-redux-0.4.8 vs test/cli_message_test.rb in sifttter-redux-0.4.9

- old
+ new

@@ -49,21 +49,21 @@ def test_warning_message assert_output('# test'.yellow + "\n") { SifttterRedux::CLIMessage::warning('test') } end - def test_prompt - with_stdin do |answer| - answer.puts 'default' - assert_equal(SifttterRedux::CLIMessage::prompt('Hit enter to give the default response', 'default'), 'default') - end - end - - def with_stdin - stdin = $stdin # remember $stdin - $stdin, write = IO.pipe # create pipe assigning its "read end" to $stdin - yield write # pass pipe's "write end" to block - ensure - write.close # close pipe - $stdin = stdin # restore $stdin - end + # def test_prompt + # with_stdin do |answer| + # answer.puts 'default' + # assert_equal(SifttterRedux::CLIMessage::prompt('Hit enter to give the default response', 'default'), 'default') + # end + # end + # + # def with_stdin + # stdin = $stdin # remember $stdin + # $stdin, write = IO.pipe # create pipe assigning its "read end" to $stdin + # yield write # pass pipe's "write end" to block + # ensure + # write.close # close pipe + # $stdin = stdin # restore $stdin + # end end