Sha256: 2a14c09990c3a41f145083a4c3a4b9254722a5ed60e856d347f0d1460ed28e53

Contents?: true

Size: 1.56 KB

Versions: 2

Compression:

Stored size: 1.56 KB

Contents

Feature: Typical usage
  In order to easily test Vim plugins,
  As a lazy Vim user,
  I want to hide details to do proper testing.

  Background:
    Given a repository "kana/vim-vspec" from offline cache

  Scenario: Testing a Vim plugin without any dependency
    Given a flavorfile with:
      """ruby
      # No dependency
      """
    And a file named "plugin/foo.vim" with:
      """vim
      let g:foo = 3
      """
    And a file named "t/basics.vim" with:
      """vim
      " Tests are written with vim-vspec.
      runtime! plugin/foo.vim
      describe 'g:foo'
        it 'is equal to 3'
          Expect g:foo == 3
        end
      end
      """
    And an executable file named "t/sh.t" with:
      """bash
      #!/bin/bash
      # It is also possible to write tests with arbitrary tools.
      # Such tests must output results in Test Anything Protocol.
      echo 'ok 1'
      echo '1..1'
      """
    When I run `vim-flavor test`
    Then it should pass with regexp:
      """
      -------- Preparing dependencies
      Checking versions...
        Use kana/vim-vspec ... 1.1.0
      Deploying plugins...
        kana/vim-vspec 1.1.0 ... done
      -------- Testing a Vim plugin
      t/sh.t .. ok
      All tests successful.
      Files=1, Tests=1,  \d+ wallclock secs .*
      Result: PASS
      t/basics.vim .. ok
      All tests successful.
      Files=1, Tests=1,  \d+ wallclock secs .*
      Result: PASS
      """
    And a lockfile is created with:
      """
      kana/vim-vspec (1.1.0)
      """
    And a dependency "kana/vim-vspec" is stored in ".vim-flavor/deps"

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
vim-flavor-1.0.3 features/testing_vim_plugins/typical_usage.feature
vim-flavor-1.0.2 features/testing_vim_plugins/typical_usage.feature