instance method step

Ruby on Rails edge

Since v8.1.3.1

Available in: v8.1.3.1 edge

Signature

step(title, *command)

Declare a step with a title and a command. The command can either be given as a single string or as multiple strings that will be passed to system as individual arguments (and therefore correctly escaped for paths etc).

Examples:

step "Setup", "bin/setup"
step "Single test", "bin/rails", "test", "--name", "test_that_is_one"

Parameters

title req
command rest
Source
# File activesupport/lib/active_support/continuous_integration.rb, line 88
    def step(title, *command)
      previous_trap = Signal.trap("INT") { abort colorize("\n#{title} interrupted", :error) }
      report_step(title, command) do
        started = Time.now.to_f
        [system(*command), Time.now.to_f - started]
      end
      abort if failing_fast?
    ensure
      Signal.trap("INT", previous_trap || "-")
    end

Defined in activesupport/lib/active_support/continuous_integration.rb line 88 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveSupport::ContinuousIntegration

Type at least 2 characters to search.

Use the arrow keys to navigate results, Enter to open one, Escape to close.

Keyboard shortcuts

/
Focus search
⌘K / Ctrl-K
Command palette
?
This help
Esc
Close