From bef57db15d5dfcb15c69412807a36160fcd1219a Mon Sep 17 00:00:00 2001 From: João M. M. da Silva + Renan Teruo Date: Wed, 30 May 2012 16:03:04 -0300 Subject: [PATCH] [Mezuro] Fixing rebase error --- plugins/mezuro/controllers/mezuro_plugin_profile_controller.rb | 1 + plugins/mezuro/test/unit/mezuro_plugin/project_content_test.rb | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) 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