implemented mock tests for plot() and y_error_plot() in test_spectrum.py