gitlabhq/features/steps/shared/project.rb

20 lines
438 B
Ruby
Raw Normal View History

2012-09-10 17:35:03 +02:00
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.team << [@user, :master]
end
# Create a specific project called "Shop"
2012-09-10 17:35:03 +02:00
And 'I own project "Shop"' do
@project = create(:project, name: "Shop")
@project.team << [@user, :master]
2012-09-10 17:35:03 +02:00
end
def current_project
@project ||= Project.first
end
2012-09-10 17:35:03 +02:00
end