diff --git a/app/views/repositories/_head.html.haml b/app/views/repositories/_head.html.haml
index 7c5ae8da..7cf8c20d 100644
--- a/app/views/repositories/_head.html.haml
+++ b/app/views/repositories/_head.html.haml
@@ -1,5 +1,5 @@
.merge-tabs.repository
- = link_to project_repository_path(@project), :class => "tab #{'active' if current_page?(project_repository_path(@project)) }" do
+ = link_to project_repository_path(@project), :class => "activities-tab tab #{'active' if current_page?(project_repository_path(@project)) }" do
%span
Activities
= link_to "#", :class => "tab" do
diff --git a/db/schema.rb b/db/schema.rb
index 3014579c..7f3264cc 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -13,6 +13,18 @@
ActiveRecord::Schema.define(:version => 20111220190817) do
+ create_table "features", :force => true do |t|
+ t.string "name"
+ t.string "branch_name"
+ t.integer "assignee_id"
+ t.integer "author_id"
+ t.integer "project_id"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ t.string "version"
+ t.integer "status", :default => 0, :null => false
+ end
+
create_table "issues", :force => true do |t|
t.string "title"
t.integer "assignee_id"
diff --git a/spec/requests/repositories_spec.rb b/spec/requests/repositories_spec.rb
new file mode 100644
index 00000000..92933b40
--- /dev/null
+++ b/spec/requests/repositories_spec.rb
@@ -0,0 +1,35 @@
+require 'spec_helper'
+
+describe "Repository" do
+
+ before do
+ @user = Factory :user
+ @project = Factory :project
+ @project.add_access(@user, :read, :write)
+ login_with @user
+ end
+
+ describe "GET /:project_name/repository" do
+ before do
+ visit project_repository_path(@project)
+ end
+
+ it "should be on projects page" do
+ current_path.should == project_repository_path(@project)
+ end
+
+ it "should have link to repo activities" do
+ page.should have_content("Activities")
+ end
+
+ it "should have link to last commit for activities tab" do
+ page.should have_content(@project.commit.safe_message[0..20])
+ page.should have_content(@project.commit.author_name)
+ end
+
+ it "should show commits list" do
+ page.all(:css, ".project-update").size.should == 20
+ end
+ end
+end
+