def test_list(self): list_output = ''' rvm rubies jruby-1.6.5.1 [ amd64 ] ree-1.8.7-2011.03 [ x86_64 ] ree-1.8.7-2011.12 [ x86_64 ] =* ree-1.8.7-2012.02 [ x86_64 ] ruby-1.9.2-p180 [ x86_64 ] ruby-1.9.3-p125 [ x86_64 ] ruby-head [ x86_64 ] # => - current # =* - current && default # * - default ''' with patch.object(rvm, '_rvm') as mock_method: mock_method.return_value = list_output self.assertEqual( [['jruby', '1.6.5.1', False], ['ree', '1.8.7-2011.03', False], ['ree', '1.8.7-2011.12', False], ['ree', '1.8.7-2012.02', True], ['ruby', '1.9.2-p180', False], ['ruby', '1.9.3-p125', False], ['ruby', 'head', False]], rvm.list_())
def test_list(self): list_output = """ rvm rubies jruby-1.6.5.1 [ amd64 ] ree-1.8.7-2011.03 [ x86_64 ] ree-1.8.7-2011.12 [ x86_64 ] =* ree-1.8.7-2012.02 [ x86_64 ] ruby-1.9.2-p180 [ x86_64 ] ruby-1.9.3-p125 [ x86_64 ] ruby-head [ x86_64 ] # => - current # =* - current && default # * - default """ with patch.object(rvm, "_rvm") as mock_method: mock_method.return_value = list_output self.assertEqual( [ ["jruby", "1.6.5.1", False], ["ree", "1.8.7-2011.03", False], ["ree", "1.8.7-2011.12", False], ["ree", "1.8.7-2012.02", True], ["ruby", "1.9.2-p180", False], ["ruby", "1.9.3-p125", False], ["ruby", "head", False], ], rvm.list_(), )