File: drb_server_integration.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 (63 lines) | stat: -rw-r--r-- 2,096 bytes parent folder | download | duplicates (2)
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
@drb @wip-jruby @spawn
Feature: DRb Server Integration
  To prevent waiting for Rails and other large Ruby applications to load their environments
  for each feature run Cucumber ships with a DRb client that can speak to a server which
  loads up the environment only once.

  This regression test highlights bug related to DRb server arguments processing, for more
  details see https://github.com/cucumber/cucumber/issues/117

  Background: App with Spork support
    Spork is a gem that has a DRb server and the scenarios below illustrate how to use it.
    However, any DRb server that adheres to the protocol that the client expects would work.

    Given a directory without standard Cucumber project directory structure
    And a file named "features/support/env.rb" with:
      """
      require 'rubygems'
      require 'spork'

      Spork.prefork do
        puts "I'm loading all the heavy stuff..."
      end

      Spork.each_run do
        puts "I'm loading the stuff just for this run..."
      end
      """
    And a file named "config/cucumber.yml" with:
      """
      <%
      std_opts = "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} --strict --tags ~@wip"
      %>
      default: --drb <%= std_opts %> features
      """
    And a file named "features/sample.feature" with:
      """
      # language: en
      Feature: Sample
        Scenario: this is a test
          Given I am just testing stuff
      """
    And a file named "features/step_definitions/all_your_steps_are_belong_to_us.rb" with:
    """
    Given /^I am just testing stuff$/ do
      # no-op
    end
    """

  Scenario: Single feature passing with '-r features' option
    Given I am running spork in the background
    When I run `cucumber features/sample.feature -r features --tags ~@wip`
    And it should pass with:
    """
    1 step (1 passed)
    """

  Scenario: Single feature passing without '-r features' option
    Given I am running spork in the background
    When I run `cucumber features/sample.feature --tags ~@wip`
    And it should pass with:
    """
    1 step (1 passed)
    """