Sha256: 4a2588dfe189f6e12b06912bab22c4739c4b86f78f7dc5a212a25431266276f3

Contents?: true

Size: 1.58 KB

Versions: 3

Compression:

Stored size: 1.58 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
      Completed.
      -------- 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

3 entries across 3 versions & 1 rubygems

Version Path
vim-flavor-1.1.2 features/testing_vim_plugins/typical_usage.feature
vim-flavor-1.1.1 features/testing_vim_plugins/typical_usage.feature
vim-flavor-1.1.0 features/testing_vim_plugins/typical_usage.feature