diff --git a/features/steps/dashboard/dashboard.rb b/features/steps/dashboard/dashboard.rb index b22b2465763afe7cb4f7fd45e03e21303055ca24..008c14514553d0d5fb6edda22eac280858b2e219 100644 --- a/features/steps/dashboard/dashboard.rb +++ b/features/steps/dashboard/dashboard.rb @@ -32,7 +32,7 @@ class Dashboard < Spinach::FeatureSteps end Given 'user with name "John Doe" joined project "Shop"' do - user = Factory.create(:user, {name: "John Doe"}) + user = create :user, {name: "John Doe"} project = Project.find_by_name "Shop" Event.create( project: project, @@ -60,14 +60,14 @@ class Dashboard < Spinach::FeatureSteps end And 'I own project "Shop"' do - @project = Factory :project, :name => 'Shop' + @project = create :project, name: 'Shop' @project.add_access(@user, :admin) end And 'I have group with projects' do - @group = Factory :group - @project = Factory :project, group: @group - @event = Factory :closed_issue_event, project: @project + @group = create :group + @project = create :project, group: @group + @event = create :closed_issue_event, project: @project @project.add_access current_user, :admin end @@ -76,25 +76,25 @@ class Dashboard < Spinach::FeatureSteps @project = Project.find_by_name("Shop") data = { - :before => "0000000000000000000000000000000000000000", - :after => "0220c11b9a3e6c69dc8fd35321254ca9a7b98f7e", - :ref => "refs/heads/new_design", - :user_id => @user.id, - :user_name => @user.name, - :repository => { - :name => @project.name, - :url => "localhost/rubinius", - :description => "", - :homepage => "localhost/rubinius", - :private => true + before: "0000000000000000000000000000000000000000", + after: "0220c11b9a3e6c69dc8fd35321254ca9a7b98f7e", + ref: "refs/heads/new_design", + user_id: @user.id, + user_name: @user.name, + repository: { + name: @project.name, + url: "localhost/rubinius", + description: "", + homepage: "localhost/rubinius", + private: true } } @event = Event.create( - :project => @project, - :action => Event::Pushed, - :data => data, - :author_id => @user.id + project: @project, + action: Event::Pushed, + data: data, + author_id: @user.id ) end diff --git a/features/steps/dashboard/dashboard_issues.rb b/features/steps/dashboard/dashboard_issues.rb index 9368782bf99e2127d0b3c41441821c53e9e22d78..e5caf905f953f58e0c197a1a6f8d963d1e9459c7 100644 --- a/features/steps/dashboard/dashboard_issues.rb +++ b/features/steps/dashboard/dashboard_issues.rb @@ -11,9 +11,9 @@ class DashboardIssues < Spinach::FeatureSteps end And 'I have assigned issues' do - project = Factory :project + project = create :project project.add_access(@user, :read, :write) - 2.times { Factory :issue, :author => @user, :assignee => @user, :project => project } + 2.times { create :issue, author: @user, assignee: @user, project: project } end end diff --git a/features/steps/dashboard/dashboard_merge_requests.rb b/features/steps/dashboard/dashboard_merge_requests.rb index fc339e756d8219f85b2cd5bfef642f9c2e20adb0..485a4ccc113380192c3fd5a6850e5766a6a3e887 100644 --- a/features/steps/dashboard/dashboard_merge_requests.rb +++ b/features/steps/dashboard/dashboard_merge_requests.rb @@ -11,13 +11,13 @@ class DashboardMergeRequests < Spinach::FeatureSteps end And 'I have authored merge requests' do - project1 = Factory :project - project2 = Factory :project + project1 = create :project + project2 = create :project project1.add_access(@user, :read, :write) project2.add_access(@user, :read, :write) - merge_request1 = Factory :merge_request, :author => @user, :project => project1 - merge_request2 = Factory :merge_request, :author => @user, :project => project2 + merge_request1 = create :merge_request, author: @user, project: project1 + merge_request2 = create :merge_request, author: @user, project: project2 end end diff --git a/features/steps/dashboard/dashboard_search.rb b/features/steps/dashboard/dashboard_search.rb index e902e40456fd615e8ad8d597316553c23980c058..53d74bf3ab70c81f10c28162918a1cd44b287c14 100644 --- a/features/steps/dashboard/dashboard_search.rb +++ b/features/steps/dashboard/dashboard_search.rb @@ -3,7 +3,7 @@ class DashboardSearch < Spinach::FeatureSteps include SharedPaths Given 'I search for "Sho"' do - fill_in "dashboard_search", :with => "Sho" + fill_in "dashboard_search", with: "Sho" click_button "Search" end @@ -12,24 +12,23 @@ class DashboardSearch < Spinach::FeatureSteps end And 'I own project "Shop"' do - @project = Factory :project, :name => "Shop" + @project = create :project, name: "Shop" @project.add_access(@user, :admin) end Given 'I search for "Contibuting"' do - fill_in "dashboard_search", :with => "Contibuting" + fill_in "dashboard_search", with: "Contibuting" click_button "Search" end And 'Project "Shop" has wiki page "Contibuting guide"' do - @wiki_page = Factory :wiki, :project => @project, - :title => "Contibuting guide", - :slug => "contributing" + @wiki_page = create :wiki, + project: @project, + title: "Contibuting guide", + slug: "contributing" end Then 'I should see "Contibuting guide" wiki link' do page.should have_link "Contibuting guide" end - - end