~ubuntu-branches/ubuntu/vivid/foodcritic/vivid-proposed

« back to all changes in this revision

Viewing changes to features/040_check_raw_git_usage.feature

  • Committer: Package Import Robot
  • Author(s): Stefano Rivera
  • Date: 2013-06-11 00:34:40 UTC
  • Revision ID: package-import@ubuntu.com-20130611003440-czusooxs9rrpe6sb
Tags: upstream-2.1.0
ImportĀ upstreamĀ versionĀ 2.1.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Feature: Check for direct usage of git
 
2
 
 
3
  In order to access source control repositories idiomatically
 
4
  As a developer
 
5
  I want to use resources for repository access rather than executing git directly
 
6
 
 
7
  Scenario Outline: Execute resource
 
8
    Given a cookbook recipe with an execute resource named <name>
 
9
    When I check the cookbook
 
10
    Then the execute resource used to run git commands warning 040 <display> be displayed
 
11
  Examples:
 
12
    | name                   | display    |
 
13
    | git pull               | should     |
 
14
    | git clone              | should     |
 
15
    | git fetch              | should     |
 
16
    | git checkout           | should     |
 
17
    | git reset --hard       | should     |
 
18
    | git show               | should not |
 
19
    | echo 'bob' && git show | should not |
 
20
    | which foo              | should not |
 
21
 
 
22
  Scenario Outline: Execute resource
 
23
    Given a cookbook recipe with an execute resource that runs the command <command>
 
24
    When I check the cookbook
 
25
    Then the execute resource used to run git commands warning 040 <display> be displayed
 
26
  Examples:
 
27
    | command                                             | display    |
 
28
    | git clone https://github.com/git/git.git            | should     |
 
29
    | git clone --depth 10 https://github.com/git/git.git | should     |
 
30
    | git pull                                            | should     |
 
31
    | git fetch origin                                    | should     |
 
32
    | git checkout master                                 | should     |
 
33
    | git reset --hard                                    | should     |
 
34
    | git show                                            | should not |
 
35
    | echo 'bob' && git show                              | should not |
 
36
    | gitk                                                | should not |
 
37
    | curl http://github.com/                             | should not |