github.com/scorpionis/hub@v2.2.1+incompatible/features/submodule_add.feature (about)

     1  Feature: hub submodule add
     2    Background:
     3      Given I am in "dotfiles" git repo
     4      # make existing repo in subdirectory so git clone isn't triggered
     5      Given a git repo in "vendor/grit"
     6  
     7    Scenario: Add public submodule
     8      When I successfully run `hub submodule add mojombo/grit vendor/grit`
     9      Then the "vendor/grit" submodule url should be "git://github.com/mojombo/grit.git"
    10      And the output should contain exactly:
    11        """
    12        Adding existing repo at 'vendor/grit' to the index\n
    13        """
    14  
    15    Scenario: Add private submodule
    16      When I successfully run `hub submodule add -p mojombo/grit vendor/grit`
    17      Then the "vendor/grit" submodule url should be "git@github.com:mojombo/grit.git"
    18  
    19    Scenario: A submodule for my own repo is public nevertheless
    20      Given I am "EvilChelu" on GitHub.com
    21      When I successfully run `hub submodule add grit vendor/grit`
    22      Then the "vendor/grit" submodule url should be "git://github.com/EvilChelu/grit.git"
    23  
    24    Scenario: Add submodule with arguments
    25      When I successfully run `hub submodule add -b foo --name grit mojombo/grit vendor/grit`
    26      Then "git submodule add -b foo --name grit git://github.com/mojombo/grit.git vendor/grit" should be run
    27  
    28    Scenario: Add submodule with branch
    29      When I successfully run `hub submodule add --branch foo mojombo/grit vendor/grit`
    30      Then "git submodule add --branch foo git://github.com/mojombo/grit.git vendor/grit" should be run