Dashboard steps: 1.9 syntax & use of create instead of Factory

This commit is contained in:
Dmitriy Zaporozhets 2012-11-07 13:56:48 +02:00
parent 8114d36caf
commit 22d0569dbb
4 changed files with 33 additions and 34 deletions

View file

@ -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