diff --git a/plugins/mezuro/controllers/mezuro_plugin_profile_controller.rb b/plugins/mezuro/controllers/mezuro_plugin_profile_controller.rb index aad37c9..6a8e59d 100644 --- a/plugins/mezuro/controllers/mezuro_plugin_profile_controller.rb +++ b/plugins/mezuro/controllers/mezuro_plugin_profile_controller.rb @@ -52,4 +52,5 @@ class MezuroPluginProfileController < ProfileController modules_results = content.result_history(params[:module_name]) score_history = modules_results.collect { |module_result| module_result.grade } render :partial => 'content_viewer/score_history', :locals => {:score_history => score_history} + end end diff --git a/plugins/mezuro/test/unit/mezuro_plugin/project_content_test.rb b/plugins/mezuro/test/unit/mezuro_plugin/project_content_test.rb index 82c2c9f..019a3fb 100644 --- a/plugins/mezuro/test/unit/mezuro_plugin/project_content_test.rb +++ b/plugins/mezuro/test/unit/mezuro_plugin/project_content_test.rb @@ -92,9 +92,11 @@ returns(module_result) end should 'not save a project with an existing project name in kalibro' do - Kalibro::Client::ProjectClient.expects(:project).with(@content.name).returns(mock) + client = mock + Kalibro::Client::ProjectClient.expects(:new).returns(client) + client.expects(:project_names).returns([@content.name]) @content.send :validate_kalibro_project_name - assert_equal @content.errors.on_base, "Project name already exists in Kalibro" + assert_equal "Project name already exists in Kalibro", @content.errors.on_base end private -- libgit2 0.21.2