github.com/bilus/oya@v0.0.3-0.20190301162104-da4acbd394c6/features/import.feature (about) 1 Feature: Importing packs 2 3 Background: 4 Given I'm in project dir 5 6 Scenario: Import a pack 7 Given file ./Oyafile containing 8 """ 9 Project: project 10 """ 11 When I run "oya import github.com/bilus/oya" 12 Then the command succeeds 13 And file ./Oyafile contains 14 """ 15 Project: project 16 Import: 17 oya: github.com/bilus/oya 18 19 """ 20 21 Scenario: Import a pack to other already imported 22 Given file ./Oyafile containing 23 """ 24 Project: project 25 Import: 26 other: github.com/bilus/oya/other 27 28 task: | 29 echo "check" 30 """ 31 When I run "oya import github.com/bilus/oya/next" 32 Then the command succeeds 33 And file ./Oyafile contains 34 """ 35 Project: project 36 Import: 37 next: github.com/bilus/oya/next 38 other: github.com/bilus/oya/other 39 40 task: | 41 echo "check" 42 43 """ 44 45 Scenario: Import a pack to empty Oyafile 46 Given file ./Oyafile containing 47 """ 48 Project: project 49 """ 50 And file ./subdir/Oyafile containing 51 """ 52 """ 53 When I'm in the ./subdir dir 54 And I run "oya import github.com/bilus/oya/next" 55 Then the command succeeds 56 And file ./subdir/Oyafile contains 57 """ 58 Import: 59 next: github.com/bilus/oya/next 60 61 """ 62 63 Scenario: Import a pack to Oyafile with other things 64 Given file ./Oyafile containing 65 """ 66 Project: project 67 68 task: | 69 echo "check" 70 """ 71 When I run "oya import github.com/bilus/oya" 72 Then the command succeeds 73 And file ./Oyafile contains 74 """ 75 Project: project 76 Import: 77 oya: github.com/bilus/oya 78 79 task: | 80 echo "check" 81 82 """ 83 84 Scenario: Import a pack which is already imported 85 Given file ./Oyafile containing 86 """ 87 Project: project 88 Import: 89 oya: github.com/bilus/oya 90 91 task: | 92 echo "check" 93 """ 94 When I run "oya import github.com/bilus/oya" 95 Then the command fails with error matching 96 """ 97 .*Pack already imported: github.com/bilus/oya.* 98 """