Sha256: 73f429328805e3aab93e6b140aa8d5293c5784572025c9bd6007646a6d8b3b6a

Contents?: true

Size: 1.3 KB

Versions: 3

Compression:

Stored size: 1.3 KB

Contents

Feature: Spork Debugger integration
  As a developer
  I want to invoke the debugger my specs within Spork
  In order to drill in and figure out what's wrong

  Background: Rails App with RSpec and Spork

    Given a file named "spec/spec_helper.rb" with:
      """
      require 'rubygems'
      require 'spork'
      require 'spork/ext/ruby-debug'

      Spork.prefork do
        require 'spec'
      end

      Spork.each_run do
      end
      """

  Scenario: Invoking the debugger via 'debugger'
    Given a file named "spec/debugger_spec.rb" with:
      """
      require File.dirname(__FILE__) + '/spec_helper.rb'

      describe "Debugger" do
        it "should debug" do
          @variable = "variable contents"
          debugger
          puts "it worked!"
        end
      end
      """

    When I fire up a spork instance with "spork rspec"
    And I run this in the background: spec --drb spec/debugger_spec.rb

    Then the spork window should output a line containing "Debug Session Started"

    When I type this in the spork window: "e @variable"
    Then the spork window should output a line containing "variable contents"

    When I type this in the spork window: "continue"

    Then the spork window should output a line containing "Debug Session Terminated"
    And the output should contain "it worked!"

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
spork-0.7.2 features/spork_debugger.feature
spork-0.7.1 features/spork_debugger.feature
spork-0.7.0 features/spork_debugger.feature