summaryrefslogtreecommitdiff
path: root/features
diff options
context:
space:
mode:
Diffstat (limited to 'features')
-rw-r--r--features/admin/active_tab.feature33
-rw-r--r--features/dashboard/active_tab.feature28
-rw-r--r--features/profile/active_tab.feature28
-rw-r--r--features/project/active_tab.feature147
-rw-r--r--features/project/commits/commits.feature6
-rw-r--r--features/steps/admin/admin_active_tab.rb29
-rw-r--r--features/steps/dashboard/dashboard_active_tab.rb25
-rw-r--r--features/steps/profile/profile_active_tab.rb25
-rw-r--r--features/steps/project/project_active_tab.rb146
-rw-r--r--features/steps/project/project_browse_commits.rb12
-rw-r--r--features/steps/project/project_browse_files.rb2
-rw-r--r--features/steps/shared/active_tab.rb19
-rw-r--r--features/steps/shared/authentication.rb4
-rw-r--r--features/steps/shared/paths.rb128
-rw-r--r--features/steps/shared/project.rb7
-rw-r--r--features/support/env.rb2
16 files changed, 616 insertions, 25 deletions
diff --git a/features/admin/active_tab.feature b/features/admin/active_tab.feature
new file mode 100644
index 00000000000..fce85ce9901
--- /dev/null
+++ b/features/admin/active_tab.feature
@@ -0,0 +1,33 @@
+Feature: Admin active tab
+ Background:
+ Given I sign in as an admin
+
+ Scenario: On Admin Home
+ Given I visit admin page
+ Then the active main tab should be Home
+ And no other main tabs should be active
+
+ Scenario: On Admin Projects
+ Given I visit admin projects page
+ Then the active main tab should be Projects
+ And no other main tabs should be active
+
+ Scenario: On Admin Users
+ Given I visit admin users page
+ Then the active main tab should be Users
+ And no other main tabs should be active
+
+ Scenario: On Admin Logs
+ Given I visit admin logs page
+ Then the active main tab should be Logs
+ And no other main tabs should be active
+
+ Scenario: On Admin Hooks
+ Given I visit admin hooks page
+ Then the active main tab should be Hooks
+ And no other main tabs should be active
+
+ Scenario: On Admin Resque
+ Given I visit admin Resque page
+ Then the active main tab should be Resque
+ And no other main tabs should be active
diff --git a/features/dashboard/active_tab.feature b/features/dashboard/active_tab.feature
new file mode 100644
index 00000000000..6715ea269c7
--- /dev/null
+++ b/features/dashboard/active_tab.feature
@@ -0,0 +1,28 @@
+Feature: Dashboard active tab
+ Background:
+ Given I sign in as a user
+
+ Scenario: On Dashboard Home
+ Given I visit dashboard page
+ Then the active main tab should be Home
+ And no other main tabs should be active
+
+ Scenario: On Dashboard Issues
+ Given I visit dashboard issues page
+ Then the active main tab should be Issues
+ And no other main tabs should be active
+
+ Scenario: On Dashboard Merge Requests
+ Given I visit dashboard merge requests page
+ Then the active main tab should be Merge Requests
+ And no other main tabs should be active
+
+ Scenario: On Dashboard Search
+ Given I visit dashboard search page
+ Then the active main tab should be Search
+ And no other main tabs should be active
+
+ Scenario: On Dashboard Help
+ Given I visit dashboard help page
+ Then the active main tab should be Help
+ And no other main tabs should be active
diff --git a/features/profile/active_tab.feature b/features/profile/active_tab.feature
new file mode 100644
index 00000000000..475641a33ed
--- /dev/null
+++ b/features/profile/active_tab.feature
@@ -0,0 +1,28 @@
+Feature: Profile active tab
+ Background:
+ Given I sign in as a user
+
+ Scenario: On Profile Home
+ Given I visit profile page
+ Then the active main tab should be Home
+ And no other main tabs should be active
+
+ Scenario: On Profile Account
+ Given I visit profile account page
+ Then the active main tab should be Account
+ And no other main tabs should be active
+
+ Scenario: On Profile SSH Keys
+ Given I visit profile SSH keys page
+ Then the active main tab should be SSH Keys
+ And no other main tabs should be active
+
+ Scenario: On Profile Design
+ Given I visit profile design page
+ Then the active main tab should be Design
+ And no other main tabs should be active
+
+ Scenario: On Profile History
+ Given I visit profile history page
+ Then the active main tab should be History
+ And no other main tabs should be active
diff --git a/features/project/active_tab.feature b/features/project/active_tab.feature
new file mode 100644
index 00000000000..2d3e41d3d33
--- /dev/null
+++ b/features/project/active_tab.feature
@@ -0,0 +1,147 @@
+Feature: Project active tab
+ Background:
+ Given I sign in as a user
+ And I own a project
+
+ # Main Tabs
+
+ Scenario: On Project Home
+ Given I visit my project's home page
+ Then the active main tab should be Home
+ And no other main tabs should be active
+
+ Scenario: On Project Files
+ Given I visit my project's files page
+ Then the active main tab should be Files
+ And no other main tabs should be active
+
+ Scenario: On Project Commits
+ Given I visit my project's commits page
+ Then the active main tab should be Commits
+ And no other main tabs should be active
+
+ Scenario: On Project Network
+ Given I visit my project's network page
+ Then the active main tab should be Network
+ And no other main tabs should be active
+
+ Scenario: On Project Issues
+ Given I visit my project's issues page
+ Then the active main tab should be Issues
+ And no other main tabs should be active
+
+ Scenario: On Project Merge Requests
+ Given I visit my project's merge requests page
+ Then the active main tab should be Merge Requests
+ And no other main tabs should be active
+
+ Scenario: On Project Wall
+ Given I visit my project's wall page
+ Then the active main tab should be Wall
+ And no other main tabs should be active
+
+ Scenario: On Project Wiki
+ Given I visit my project's wiki page
+ Then the active main tab should be Wiki
+ And no other main tabs should be active
+
+ # Sub Tabs: Home
+
+ Scenario: On Project Home/Show
+ Given I visit my project's home page
+ Then the active sub tab should be Show
+ And no other sub tabs should be active
+ And the active main tab should be Home
+
+ Scenario: On Project Home/Team
+ Given I visit my project's home page
+ And I click the "Team" tab
+ Then the active sub tab should be Team
+ And no other sub tabs should be active
+ And the active main tab should be Home
+
+ Scenario: On Project Home/Attachments
+ Given I visit my project's home page
+ And I click the "Attachments" tab
+ Then the active sub tab should be Attachments
+ And no other sub tabs should be active
+ And the active main tab should be Home
+
+ Scenario: On Project Home/Snippets
+ Given I visit my project's home page
+ And I click the "Snippets" tab
+ Then the active sub tab should be Snippets
+ And no other sub tabs should be active
+ And the active main tab should be Home
+
+ Scenario: On Project Home/Edit
+ Given I visit my project's home page
+ And I click the "Edit" tab
+ Then the active sub tab should be Edit
+ And no other sub tabs should be active
+ And the active main tab should be Home
+
+ Scenario: On Project Home/Hooks
+ Given I visit my project's home page
+ And I click the "Hooks" tab
+ Then the active sub tab should be Hooks
+ And no other sub tabs should be active
+ And the active main tab should be Home
+
+ Scenario: On Project Home/Deploy Keys
+ Given I visit my project's home page
+ And I click the "Deploy Keys" tab
+ Then the active sub tab should be Deploy Keys
+ And no other sub tabs should be active
+ And the active main tab should be Home
+
+ # Sub Tabs: Commits
+
+ Scenario: On Project Commits/Commits
+ Given I visit my project's commits page
+ Then the active sub tab should be Commits
+ And no other sub tabs should be active
+ And the active main tab should be Commits
+
+ Scenario: On Project Commits/Compare
+ Given I visit my project's commits page
+ And I click the "Compare" tab
+ Then the active sub tab should be Compare
+ And no other sub tabs should be active
+ And the active main tab should be Commits
+
+ Scenario: On Project Commits/Branches
+ Given I visit my project's commits page
+ And I click the "Branches" tab
+ Then the active sub tab should be Branches
+ And no other sub tabs should be active
+ And the active main tab should be Commits
+
+ Scenario: On Project Commits/Tags
+ Given I visit my project's commits page
+ And I click the "Tags" tab
+ Then the active sub tab should be Tags
+ And no other sub tabs should be active
+ And the active main tab should be Commits
+
+ # Sub Tabs: Issues
+
+ Scenario: On Project Issues/Browse
+ Given I visit my project's issues page
+ Then the active sub tab should be Browse Issues
+ And no other sub tabs should be active
+ And the active main tab should be Issues
+
+ Scenario: On Project Issues/Milestones
+ Given I visit my project's issues page
+ And I click the "Milestones" tab
+ Then the active sub tab should be Milestones
+ And no other sub tabs should be active
+ And the active main tab should be Issues
+
+ Scenario: On Project Issues/Labels
+ Given I visit my project's issues page
+ And I click the "Labels" tab
+ Then the active sub tab should be Labels
+ And no other sub tabs should be active
+ And the active main tab should be Issues
diff --git a/features/project/commits/commits.feature b/features/project/commits/commits.feature
index 53de6e6a264..df795ef71e6 100644
--- a/features/project/commits/commits.feature
+++ b/features/project/commits/commits.feature
@@ -1,8 +1,8 @@
Feature: Project Browse commits
Background:
Given I sign in as a user
- And I own project "Shop"
- Given I visit project commits page
+ And I own a project
+ And I visit my project's commits page
Scenario: I browse commits list for master branch
Then I see project commits
@@ -18,4 +18,4 @@ Feature: Project Browse commits
Scenario: I compare refs
Given I visit compare refs page
And I fill compare fields with refs
- And I see compared refs
+ Then I see compared refs
diff --git a/features/steps/admin/admin_active_tab.rb b/features/steps/admin/admin_active_tab.rb
new file mode 100644
index 00000000000..29290892823
--- /dev/null
+++ b/features/steps/admin/admin_active_tab.rb
@@ -0,0 +1,29 @@
+class AdminActiveTab < Spinach::FeatureSteps
+ include SharedAuthentication
+ include SharedPaths
+ include SharedActiveTab
+
+ Then 'the active main tab should be Home' do
+ ensure_active_main_tab('Stats')
+ end
+
+ Then 'the active main tab should be Projects' do
+ ensure_active_main_tab('Projects')
+ end
+
+ Then 'the active main tab should be Users' do
+ ensure_active_main_tab('Users')
+ end
+
+ Then 'the active main tab should be Logs' do
+ ensure_active_main_tab('Logs')
+ end
+
+ Then 'the active main tab should be Hooks' do
+ ensure_active_main_tab('Hooks')
+ end
+
+ Then 'the active main tab should be Resque' do
+ ensure_active_main_tab('Resque')
+ end
+end
diff --git a/features/steps/dashboard/dashboard_active_tab.rb b/features/steps/dashboard/dashboard_active_tab.rb
new file mode 100644
index 00000000000..41ecc48c0d3
--- /dev/null
+++ b/features/steps/dashboard/dashboard_active_tab.rb
@@ -0,0 +1,25 @@
+class DashboardActiveTab < Spinach::FeatureSteps
+ include SharedAuthentication
+ include SharedPaths
+ include SharedActiveTab
+
+ Then 'the active main tab should be Home' do
+ ensure_active_main_tab('Home')
+ end
+
+ Then 'the active main tab should be Issues' do
+ ensure_active_main_tab('Issues')
+ end
+
+ Then 'the active main tab should be Merge Requests' do
+ ensure_active_main_tab('Merge Requests')
+ end
+
+ Then 'the active main tab should be Search' do
+ ensure_active_main_tab('Search')
+ end
+
+ Then 'the active main tab should be Help' do
+ ensure_active_main_tab('Help')
+ end
+end
diff --git a/features/steps/profile/profile_active_tab.rb b/features/steps/profile/profile_active_tab.rb
new file mode 100644
index 00000000000..1924a6fa785
--- /dev/null
+++ b/features/steps/profile/profile_active_tab.rb
@@ -0,0 +1,25 @@
+class ProfileActiveTab < Spinach::FeatureSteps
+ include SharedAuthentication
+ include SharedPaths
+ include SharedActiveTab
+
+ Then 'the active main tab should be Home' do
+ ensure_active_main_tab('Profile')
+ end
+
+ Then 'the active main tab should be Account' do
+ ensure_active_main_tab('Account')
+ end
+
+ Then 'the active main tab should be SSH Keys' do
+ ensure_active_main_tab('SSH Keys')
+ end
+
+ Then 'the active main tab should be Design' do
+ ensure_active_main_tab('Design')
+ end
+
+ Then 'the active main tab should be History' do
+ ensure_active_main_tab('History')
+ end
+end
diff --git a/features/steps/project/project_active_tab.rb b/features/steps/project/project_active_tab.rb
new file mode 100644
index 00000000000..a5c80353862
--- /dev/null
+++ b/features/steps/project/project_active_tab.rb
@@ -0,0 +1,146 @@
+class ProjectActiveTab < Spinach::FeatureSteps
+ include SharedAuthentication
+ include SharedPaths
+ include SharedProject
+ include SharedActiveTab
+
+ # Main Tabs
+
+ Then 'the active main tab should be Home' do
+ ensure_active_main_tab(@project.name)
+ end
+
+ Then 'the active main tab should be Files' do
+ ensure_active_main_tab('Files')
+ end
+
+ Then 'the active main tab should be Commits' do
+ ensure_active_main_tab('Commits')
+ end
+
+ Then 'the active main tab should be Network' do
+ ensure_active_main_tab('Network')
+ end
+
+ Then 'the active main tab should be Issues' do
+ ensure_active_main_tab('Issues')
+ end
+
+ Then 'the active main tab should be Merge Requests' do
+ ensure_active_main_tab('Merge Requests')
+ end
+
+ Then 'the active main tab should be Wall' do
+ ensure_active_main_tab('Wall')
+ end
+
+ Then 'the active main tab should be Wiki' do
+ ensure_active_main_tab('Wiki')
+ end
+
+ # Sub Tabs: Home
+
+ Given 'I click the "Team" tab' do
+ click_link('Team')
+ end
+
+ Given 'I click the "Attachments" tab' do
+ click_link('Attachments')
+ end
+
+ Given 'I click the "Snippets" tab' do
+ click_link('Snippets')
+ end
+
+ Given 'I click the "Edit" tab' do
+ click_link('Edit')
+ end
+
+ Given 'I click the "Hooks" tab' do
+ click_link('Hooks')
+ end
+
+ Given 'I click the "Deploy Keys" tab' do
+ click_link('Deploy Keys')
+ end
+
+ Then 'the active sub tab should be Show' do
+ ensure_active_sub_tab('Show')
+ end
+
+ Then 'the active sub tab should be Team' do
+ ensure_active_sub_tab('Team')
+ end
+
+ Then 'the active sub tab should be Attachments' do
+ ensure_active_sub_tab('Attachments')
+ end
+
+ Then 'the active sub tab should be Snippets' do
+ ensure_active_sub_tab('Snippets')
+ end
+
+ Then 'the active sub tab should be Edit' do
+ ensure_active_sub_tab('Edit')
+ end
+
+ Then 'the active sub tab should be Hooks' do
+ ensure_active_sub_tab('Hooks')
+ end
+
+ Then 'the active sub tab should be Deploy Keys' do
+ ensure_active_sub_tab('Deploy Keys')
+ end
+
+ # Sub Tabs: Commits
+
+ Given 'I click the "Compare" tab' do
+ click_link('Compare')
+ end
+
+ Given 'I click the "Branches" tab' do
+ click_link('Branches')
+ end
+
+ Given 'I click the "Tags" tab' do
+ click_link('Tags')
+ end
+
+ Then 'the active sub tab should be Commits' do
+ ensure_active_sub_tab('Commits')
+ end
+
+ Then 'the active sub tab should be Compare' do
+ ensure_active_sub_tab('Compare')
+ end
+
+ Then 'the active sub tab should be Branches' do
+ ensure_active_sub_tab('Branches')
+ end
+
+ Then 'the active sub tab should be Tags' do
+ ensure_active_sub_tab('Tags')
+ end
+
+ # Sub Tabs: Issues
+
+ Given 'I click the "Milestones" tab' do
+ click_link('Milestones')
+ end
+
+ Given 'I click the "Labels" tab' do
+ click_link('Labels')
+ end
+
+ Then 'the active sub tab should be Browse Issues' do
+ ensure_active_sub_tab('Browse Issues')
+ end
+
+ Then 'the active sub tab should be Milestones' do
+ ensure_active_sub_tab('Milestones')
+ end
+
+ Then 'the active sub tab should be Labels' do
+ ensure_active_sub_tab('Labels')
+ end
+end
diff --git a/features/steps/project/project_browse_commits.rb b/features/steps/project/project_browse_commits.rb
index 014799879e8..cb5cabe98b3 100644
--- a/features/steps/project/project_browse_commits.rb
+++ b/features/steps/project/project_browse_commits.rb
@@ -4,8 +4,6 @@ class ProjectBrowseCommits < Spinach::FeatureSteps
include SharedPaths
Then 'I see project commits' do
- current_path.should == project_commits_path(@project)
-
commit = @project.commit
page.should have_content(@project.name)
page.should have_content(commit.message)
@@ -34,14 +32,14 @@ class ProjectBrowseCommits < Spinach::FeatureSteps
end
And 'I fill compare fields with refs' do
- fill_in "from", :with => "master"
- fill_in "to", :with => "stable"
+ fill_in "from", with: "bcf03b5de6c33f3869ef70d68cf06e679d1d7f9a"
+ fill_in "to", with: "8716fc78f3c65bbf7bcf7b574febd583bc5d2812"
click_button "Compare"
end
- And 'I see compared refs' do
- page.should have_content "Commits (27)"
+ Then 'I see compared refs' do
page.should have_content "Compare View"
- page.should have_content "Showing 73 changed files"
+ page.should have_content "Commits (1)"
+ page.should have_content "Showing 2 changed files"
end
end
diff --git a/features/steps/project/project_browse_files.rb b/features/steps/project/project_browse_files.rb
index 67c553ced40..652daba01c0 100644
--- a/features/steps/project/project_browse_files.rb
+++ b/features/steps/project/project_browse_files.rb
@@ -10,7 +10,7 @@ class ProjectBrowseFiles < Spinach::FeatureSteps
end
Then 'I should see files from repository for "8470d70"' do
- current_path.should == tree_project_ref_path(@project, "8470d70")
+ current_path.should == project_tree_path(@project, "8470d70")
page.should have_content "app"
page.should have_content "History"
page.should have_content "Gemfile"
diff --git a/features/steps/shared/active_tab.rb b/features/steps/shared/active_tab.rb
new file mode 100644
index 00000000000..884f2d5fb71
--- /dev/null
+++ b/features/steps/shared/active_tab.rb
@@ -0,0 +1,19 @@
+module SharedActiveTab
+ include Spinach::DSL
+
+ def ensure_active_main_tab(content)
+ page.find('ul.main_menu li.active').should have_content(content)
+ end
+
+ def ensure_active_sub_tab(content)
+ page.find('div.content ul.nav-tabs li.active').should have_content(content)
+ end
+
+ And 'no other main tabs should be active' do
+ page.should have_selector('ul.main_menu li.active', count: 1)
+ end
+
+ And 'no other sub tabs should be active' do
+ page.should have_selector('div.content ul.nav-tabs li.active', count: 1)
+ end
+end
diff --git a/features/steps/shared/authentication.rb b/features/steps/shared/authentication.rb
index 77d9839f5b7..2add91617fe 100644
--- a/features/steps/shared/authentication.rb
+++ b/features/steps/shared/authentication.rb
@@ -7,4 +7,8 @@ module SharedAuthentication
Given 'I sign in as a user' do
login_as :user
end
+
+ Given 'I sign in as an admin' do
+ login_as :admin
+ end
end
diff --git a/features/steps/shared/paths.rb b/features/steps/shared/paths.rb
index 93ad0219d3d..8efedfa1083 100644
--- a/features/steps/shared/paths.rb
+++ b/features/steps/shared/paths.rb
@@ -1,22 +1,38 @@
module SharedPaths
include Spinach::DSL
- And 'I visit dashboard search page' do
- visit search_path
+ When 'I visit new project page' do
+ visit new_project_path
end
- And 'I visit dashboard merge requests page' do
- visit dashboard_merge_requests_path
+ # ----------------------------------------
+ # Dashboard
+ # ----------------------------------------
+
+ Given 'I visit dashboard page' do
+ visit dashboard_path
end
- And 'I visit dashboard issues page' do
+ Given 'I visit dashboard issues page' do
visit dashboard_issues_path
end
- When 'I visit dashboard page' do
- visit dashboard_path
+ Given 'I visit dashboard merge requests page' do
+ visit dashboard_merge_requests_path
+ end
+
+ Given 'I visit dashboard search page' do
+ visit search_path
end
+ Given 'I visit dashboard help page' do
+ visit help_path
+ end
+
+ # ----------------------------------------
+ # Profile
+ # ----------------------------------------
+
Given 'I visit profile page' do
visit profile_path
end
@@ -25,14 +41,94 @@ module SharedPaths
visit profile_account_path
end
+ Given 'I visit profile SSH keys page' do
+ visit keys_path
+ end
+
+ Given 'I visit profile design page' do
+ visit profile_design_path
+ end
+
+ Given 'I visit profile history page' do
+ visit profile_history_path
+ end
+
Given 'I visit profile token page' do
visit profile_token_path
end
- When 'I visit new project page' do
- visit new_project_path
+ # ----------------------------------------
+ # Admin
+ # ----------------------------------------
+
+ Given 'I visit admin page' do
+ visit admin_root_path
+ end
+
+ Given 'I visit admin projects page' do
+ visit admin_projects_path
end
+ Given 'I visit admin users page' do
+ visit admin_users_path
+ end
+
+ Given 'I visit admin logs page' do
+ visit admin_logs_path
+ end
+
+ Given 'I visit admin hooks page' do
+ visit admin_hooks_path
+ end
+
+ Given 'I visit admin Resque page' do
+ visit admin_resque_path
+ end
+
+ # ----------------------------------------
+ # Generic Project
+ # ----------------------------------------
+
+ Given "I visit my project's home page" do
+ visit project_path(@project)
+ end
+
+ Given "I visit my project's files page" do
+ visit project_tree_path(@project, @project.root_ref)
+ end
+
+ Given "I visit my project's commits page" do
+ visit project_commits_path(@project, @project.root_ref, {limit: 5})
+ end
+
+ Given "I visit my project's network page" do
+ # Stub out find_all to speed this up (10 commits vs. 650)
+ commits = Grit::Commit.find_all(@project.repo, nil, {max_count: 10})
+ Grit::Commit.stub(:find_all).and_return(commits)
+
+ visit graph_project_path(@project)
+ end
+
+ Given "I visit my project's issues page" do
+ visit project_issues_path(@project)
+ end
+
+ Given "I visit my project's merge requests page" do
+ visit project_merge_requests_path(@project)
+ end
+
+ Given "I visit my project's wall page" do
+ visit wall_project_path(@project)
+ end
+
+ Given "I visit my project's wiki page" do
+ visit project_wiki_path(@project, :index)
+ end
+
+ # ----------------------------------------
+ # "Shop" Project
+ # ----------------------------------------
+
And 'I visit project "Shop" page' do
project = Project.find_by_name("Shop")
visit project_path(project)
@@ -43,23 +139,27 @@ module SharedPaths
end
Given 'I visit compare refs page' do
- visit compare_project_commits_path(@project)
+ visit project_compare_index_path(@project)
end
Given 'I visit project commits page' do
- visit project_commits_path(@project)
+ visit project_commits_path(@project, @project.root_ref, {limit: 5})
+ end
+
+ Given 'I visit project commits page for stable branch' do
+ visit project_commits_path(@project, 'stable', {limit: 5})
end
Given 'I visit project source page' do
- visit tree_project_ref_path(@project, @project.root_ref)
+ visit project_tree_path(@project, @project.root_ref)
end
Given 'I visit blob file from repo' do
- visit tree_project_ref_path(@project, ValidCommit::ID, :path => ValidCommit::BLOB_FILE_PATH)
+ visit project_tree_path(@project, File.join(ValidCommit::ID, ValidCommit::BLOB_FILE_PATH))
end
Given 'I visit project source page for "8470d70"' do
- visit tree_project_ref_path(@project, "8470d70")
+ visit project_tree_path(@project, "8470d70")
end
Given 'I visit project tags page' do
diff --git a/features/steps/shared/project.rb b/features/steps/shared/project.rb
index 9b64ca59a3b..0f93d675786 100644
--- a/features/steps/shared/project.rb
+++ b/features/steps/shared/project.rb
@@ -1,6 +1,13 @@
module SharedProject
include Spinach::DSL
+ # Create a project without caring about what it's called
+ And "I own a project" do
+ @project = create(:project)
+ @project.add_access(@user, :admin)
+ end
+
+ # Create a specific project called "Shop"
And 'I own project "Shop"' do
@project = Factory :project, :name => "Shop"
@project.add_access(@user, :admin)
diff --git a/features/support/env.rb b/features/support/env.rb
index 9c6cef07298..6d49c25a8ba 100644
--- a/features/support/env.rb
+++ b/features/support/env.rb
@@ -23,5 +23,7 @@ Spinach.hooks.after_scenario { DatabaseCleaner.clean }
Spinach.hooks.before_run do
RSpec::Mocks::setup self
+ include FactoryGirl::Syntax::Methods
+
stub_gitolite!
end