File: interrupt.feature

package info (click to toggle)
ruby-guard 2.18.1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,344 kB
  • sloc: ruby: 9,256; makefile: 6
file content (33 lines) | stat: -rw-r--r-- 767 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
Feature: handle while editing CTRL-C

  In order to cancel a command in Pry
  As a user
  I want CTRL-C to clear the Pry prompt

  Background: Guard is installed through bundler
    Given Guard is bundled using source

  @spawn
  Scenario: Continue after a failing task
    Given my Guardfile contains:
    """
    require 'guard/plugin'

    module ::Guard
      class Myplugin < Plugin
        def run_on_additions(files)
          $stdout.puts "Files added: #{files.inspect}"
          $stdout.flush
        end
      end
    end

    guard(:myplugin) { watch('bar') }

    """
    Given an empty file named "foo"
    When I start `bundle exec guard -n f`
    And I press Ctrl-C
    And I type in "1+2"
    And I stop guard
    Then the output should match /=> 3/