forked from rubygems/rubygems.org
/
search.feature
53 lines (48 loc) · 1.71 KB
/
search.feature
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
Feature: Search
In order to find a gem I want
As a ruby developer
I should be able to search for gems on gemcutter
Scenario Outline: Search
Given the following versions exist:
| rubygem | description |
| name: LDAP | mail stuff |
| name: twitter | social junk |
| name: beer_laser | amazing beer |
When I go to the homepage
And I fill in "query" with "<query>"
And I press "Search"
Then I should see "<result>"
Examples:
| query | result |
| twitter | social junk |
| beer | beer_laser |
| ldap | mail stuff |
| beer laser | amazing beer |
| LDAP | Exact match |
Scenario: Exact match not found
Given the following version exists:
| rubygem | description |
| name: foos-paperclip | paperclip |
When I go to the homepage
And I fill in "query" with "paperclip"
And I press "Search"
Then I should not see "Exact match"
But I should see "foos-paperclip"
Scenario: The only pushed version of a gem is yanked
Given the following version exists:
| rubygem | number | indexed |
| name: RGem | 1.0.0 | false |
When I go to the homepage
And I fill in "query" with "RGem"
And I press "Search"
Then I should not see "RGem (1.0.0)"
Scenario: The most recent version of a gem is yanked
Given the following versions exist:
| rubygem | number | indexed |
| name: RGem | 1.2.1 | true |
| name: RGem | 1.2.2 | false |
When I go to the homepage
And I fill in "query" with "RGem"
And I press "Search"
And I should see "RGem (1.2.1)"
And I should not see "RGem (1.2.2)"