diff --git a/app/views/users/_rates.html.erb b/app/views/users/_rates.html.erb
new file mode 100644
index 0000000..98293d4
--- /dev/null
+++ b/app/views/users/_rates.html.erb
@@ -0,0 +1 @@
+
Hello Rates
\ No newline at end of file
diff --git a/init.rb b/init.rb
index 4af2d5c..a7e0a75 100644
--- a/init.rb
+++ b/init.rb
@@ -1,5 +1,7 @@
require 'redmine'
+require 'rate_users_helper_patch'
+
Redmine::Plugin.register :redmine_rate do
name 'Rate Plugin'
author 'Eric Davis'
diff --git a/lang/en.yml b/lang/en.yml
index e338591..0852e39 100644
--- a/lang/en.yml
+++ b/lang/en.yml
@@ -1,2 +1,2 @@
# English strings go here
-my_label: "My label"
+rate_label_rates: Rates
diff --git a/lib/rate_users_helper_patch.rb b/lib/rate_users_helper_patch.rb
new file mode 100644
index 0000000..3edcb94
--- /dev/null
+++ b/lib/rate_users_helper_patch.rb
@@ -0,0 +1,24 @@
+require_dependency 'users_helper'
+
+module RateUsersHelperPatch
+ def self.included(base) # :nodoc:
+ base.send(:include, InstanceMethods)
+
+ base.class_eval do
+ alias_method_chain :user_settings_tabs, :rate_tab
+ end
+ end
+
+ module InstanceMethods
+ # Adds a rates tab to the user administration page
+ def user_settings_tabs_with_rate_tab
+ tabs = user_settings_tabs_without_rate_tab
+ tabs << { :name => 'rates', :partial => 'users/rates', :label => :rate_label_rates}
+ return tabs
+ end
+
+ end
+end
+
+UsersHelper.send(:include, RateUsersHelperPatch)
+
diff --git a/spec/lib/rate_users_helper_patch_spec.rb b/spec/lib/rate_users_helper_patch_spec.rb
new file mode 100644
index 0000000..14703d4
--- /dev/null
+++ b/spec/lib/rate_users_helper_patch_spec.rb
@@ -0,0 +1,38 @@
+require File.dirname(__FILE__) + '/../spec_helper'
+
+class UsersHelperWrapper
+ include UsersHelper
+end
+
+describe UsersHelper, 'user_settings' do
+ it 'should return 3 tabs' do
+ helper = UsersHelperWrapper.new
+ helper.user_settings_tabs.should have(3).things
+
+ end
+
+ it 'should include a rate tab at the end' do
+ helper = UsersHelperWrapper.new
+ rate_tab = helper.user_settings_tabs[-1]
+ rate_tab.should_not be_nil
+ end
+
+ describe 'rate tab' do
+ before(:each) do
+ helper = UsersHelperWrapper.new
+ @rate_tab = helper.user_settings_tabs[-1]
+ end
+
+ it 'should have the name of "rates"' do
+ @rate_tab[:name].should eql('rates')
+ end
+
+ it 'should use the rates partial' do
+ @rate_tab[:partial].should eql('users/rates')
+ end
+
+ it 'should use the i18n rates label' do
+ @rate_tab[:label].should eql(:rate_label_rates)
+ end
+ end
+end