Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 96 lines (78 sloc) 4.134 kB
18628f8 @mislav fix hub browse, rewrite its tests as cukes
mislav authored
1 Feature: hub browse
2 Scenario: Project with owner
3 When I successfully run `hub browse mislav/dotfiles`
4 Then there should be no output
5 And "open https://github.com/mislav/dotfiles" should be run
6
7 Scenario: Project without owner
8 Given I am "mislav" on github.com
9 When I successfully run `hub browse dotfiles`
10 Then "open https://github.com/mislav/dotfiles" should be run
11
12 Scenario: Explicit project overrides current
13 Given I am in "git://github.com/josh/rails-behaviors.git" git repo
14 And I am "mislav" on github.com
15 When I successfully run `hub browse dotfiles`
16 Then "open https://github.com/mislav/dotfiles" should be run
17
18 Scenario: Project issues
19 When I successfully run `hub browse mislav/dotfiles issues`
20 Then "open https://github.com/mislav/dotfiles/issues" should be run
21
22 Scenario: Project wiki
23 When I successfully run `hub browse mislav/dotfiles wiki`
24 Then "open https://github.com/mislav/dotfiles/wiki" should be run
25
26 Scenario: Project commits on master
27 When I successfully run `hub browse mislav/dotfiles commits`
28 Then "open https://github.com/mislav/dotfiles/commits/master" should be run
29
30 Scenario: Specific commit in project
31 When I successfully run `hub browse mislav/dotfiles commit/4173c3b`
32 Then "open https://github.com/mislav/dotfiles/commit/4173c3b" should be run
33
34 Scenario: Output the URL instead of browse
35 When I successfully run `hub browse -u mislav/dotfiles`
36 Then the output should contain exactly "https://github.com/mislav/dotfiles\n"
37 But "open https://github.com/mislav/dotfiles" should not be run
38
39 Scenario: Current project
40 Given I am in "git://github.com/mislav/dotfiles.git" git repo
41 When I successfully run `hub browse`
42 Then there should be no output
43 And "open https://github.com/mislav/dotfiles" should be run
44
45 Scenario: Commit in current project
46 Given I am in "git://github.com/mislav/dotfiles.git" git repo
47 When I successfully run `hub browse -- commit/abcd1234`
48 Then "open https://github.com/mislav/dotfiles/commit/abcd1234" should be run
49
50 Scenario: Current branch
51 Given I am in "git://github.com/mislav/dotfiles.git" git repo
52 And I am on the "feature" branch with upstream "origin/experimental"
53 When I successfully run `hub browse`
54 Then "open https://github.com/mislav/dotfiles/tree/experimental" should be run
55
56 Scenario: Current branch, no tracking
57 Given I am in "git://github.com/mislav/dotfiles.git" git repo
58 And I am on the "feature" branch
59 When I successfully run `hub browse`
60 Then "open https://github.com/mislav/dotfiles" should be run
61
62 Scenario: Commits on current branch
63 Given I am in "git://github.com/mislav/dotfiles.git" git repo
64 And I am on the "feature" branch with upstream "origin/experimental"
65 When I successfully run `hub browse -- commits`
66 Then "open https://github.com/mislav/dotfiles/commits/experimental" should be run
67
68 Scenario: Complex branch
69 Given I am in "git://github.com/mislav/dotfiles.git" git repo
70 And I am on the "foo/bar" branch with upstream "origin/baz/qux"
71 When I successfully run `hub browse`
72 Then "open https://github.com/mislav/dotfiles/tree/baz/qux" should be run
73
74 Scenario: Wiki repo
75 Given I am in "git://github.com/defunkt/hub.wiki.git" git repo
76 When I successfully run `hub browse`
77 Then "open https://github.com/defunkt/hub/wiki" should be run
78
79 Scenario: Wiki commits
80 Given I am in "git://github.com/defunkt/hub.wiki.git" git repo
81 When I successfully run `hub browse -- commits`
82 Then "open https://github.com/defunkt/hub/wiki/_history" should be run
83
84 Scenario: Wiki pages
85 Given I am in "git://github.com/defunkt/hub.wiki.git" git repo
86 When I successfully run `hub browse -- pages`
87 Then "open https://github.com/defunkt/hub/wiki/_pages" should be run
88
89 Scenario: Deprecated -p flag
90 When I successfully run `hub browse -p defunkt/hub`
91 Then the stderr should contain exactly:
92 """
93 Warning: the `-p` flag has no effect anymore\n
94 """
95 But "open https://github.com/defunkt/hub" should be run
Something went wrong with that request. Please try again.