blob: 3be431635584a1fc127ff44dc2d41ff945445518 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
When(/^the user is on the gyms page$/) do
@subject = GymsPage.new
@subject.visit_page
end
And(/^There are (.*) gyms$/) do |n|
@gyms = n.to_i.times.map do
FactoryGirl.create(:gym)
end
end
Then(/^it lists all gyms$/) do
@gyms.each do |gym|
expect(@subject).to have_content(gym.name)
end
end
When(/^they search for a city/) do
gym = @gyms.sample
@subject.search(gym.location.city)
@gyms = [gym]
end
|