test/test_client.rb in stars-0.2.1 vs test/test_client.rb in stars-0.3.0

- old
+ new

@@ -4,19 +4,21 @@ def test_load_with_username mock(Stars::Client).system.with('clear').returns('') mock(Stars::Formatter).new.times(any_times).with_any_args mock(Stars::Client).puts.times(any_times).with_any_args - mock(Stars::Client).gets.times(any_times).with_any_args.returns('q') + mock(Stars::Client).print.times(any_times).with_any_args + mock(Stars::Client).input.times(any_times).with_any_args.returns('q') Stars::Client.load!('holman') end def test_load_without_username mock(Stars::Client).system.with('clear').returns('') mock(Stars::Formatter).new.times(any_times).with_any_args mock(Stars::Client).puts.times(any_times).with_any_args - mock(Stars::Client).gets.times(any_times).with_any_args.returns('q') + mock(Stars::Client).print.times(any_times).with_any_args + mock(Stars::Client).input.times(any_times).with_any_args.returns('q') Stars::Client.load!(nil) end def test_username_when_exists mock(File).exists?.with_any_args.returns(true) @@ -36,6 +38,6 @@ def test_config_path assert Stars::Client.config_path.index('.stars') end -end \ No newline at end of file +end