File: run_cli_main_with_existing_runtime.feature

package info (click to toggle)
cucumber 1.3.17-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 3,296 kB
  • ctags: 1,812
  • sloc: ruby: 13,576; python: 28; sh: 10; makefile: 10; tcl: 3
file content (34 lines) | stat: -rw-r--r-- 995 bytes parent folder | download | duplicates (3)
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
34
Feature: Run Cli::Main with existing Runtime

  This is the API that Spork uses. It creates an existing runtime then
  calls load_programming_language('rb') on it to load the RbDsl.
  When the process forks, Spork them passes the runtime to Cli::Main to 
  run it.

    Background: 
      Given a standard Cucumber project directory structure

    Scenario: Run a single feature
      Given a file named "features/step_definitions/success.rb" with:
        """
        Given(/pass/) {}
        """
      Given a file named "features/success.feature" with:
        """
        Feature: 
          Scenario: 
            Given I pass
        """
      When I run the following Ruby code:
        """
        require 'cucumber'
        runtime = Cucumber::Runtime.new
        runtime.load_programming_language('rb')
        Cucumber::Cli::Main.new([]).execute!(runtime)
        
        """
      Then it should pass
      And the output should contain:
        """
        Given I pass
        """