spork 0.7.2 → 0.7.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/bin/spork CHANGED
@@ -1,6 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
2
  require 'rubygems'
3
- gem 'test-unit', '1.2.3' if RUBY_VERSION.to_f >= 1.9 # Why do we need this?
4
3
 
5
4
  $LOAD_PATH.unshift(File.dirname(__FILE__) + '/../lib') unless $LOAD_PATH.include?(File.dirname(__FILE__) + '/../lib')
6
5
 
@@ -38,12 +38,6 @@ Feature: Cucumber integration with rails
38
38
  end
39
39
 
40
40
  Spork.each_run do
41
- # This code will be run each time you run your specs.
42
-
43
- Cucumber::Rails.use_transactional_fixtures
44
- Cucumber::Rails.bypass_rescue # Comment out this line if you want Rails own error handling
45
- # (e.g. rescue_action_in_public / rescue_responses / rescue_from)
46
-
47
41
  #### this is for this test only #######
48
42
  $loaded_stuff << 'each_run block' #####
49
43
  #######################################
@@ -26,7 +26,44 @@ Feature: Spork Debugger integration
26
26
 
27
27
  describe "Debugger" do
28
28
  it "should debug" do
29
- @variable = "variable contents"
29
+ 2.times do |count|
30
+ @message = "count = #{count}"
31
+ debugger
32
+ @message = nil
33
+ end
34
+ puts "it worked!"
35
+ end
36
+ end
37
+ """
38
+
39
+ When I fire up a spork instance with "spork rspec"
40
+ And I run this in the background: spec --drb spec/debugger_spec.rb
41
+
42
+ Then the spork window should output a line containing "Debug Session Started"
43
+
44
+ When I type this in the spork window: "e @message"
45
+ Then the spork window should output a line containing "count = 0"
46
+
47
+ When I type this in the spork window: "continue"
48
+
49
+ When I type this in the spork window: "e @message"
50
+ Then the spork window should output a line containing "count = 1"
51
+
52
+ When I type this in the spork window: "continue"
53
+
54
+ Then the spork window should output a line containing "Debug Session Terminated"
55
+ And the output should contain "it worked!"
56
+
57
+ Scenario: When ruby-debug is already required and started.
58
+ Given a file named "spec/debugger_spec.rb" with:
59
+ """
60
+ require File.dirname(__FILE__) + '/spec_helper.rb'
61
+ require 'ruby-debug'
62
+ Debugger.start
63
+
64
+ describe "Debugger" do
65
+ it "should debug" do
66
+ @message = "yup"
30
67
  debugger
31
68
  puts "it worked!"
32
69
  end
@@ -38,8 +75,8 @@ Feature: Spork Debugger integration
38
75
 
39
76
  Then the spork window should output a line containing "Debug Session Started"
40
77
 
41
- When I type this in the spork window: "e @variable"
42
- Then the spork window should output a line containing "variable contents"
78
+ When I type this in the spork window: "e @message"
79
+ Then the spork window should output a line containing "yup"
43
80
 
44
81
  When I type this in the spork window: "continue"
45
82
 
@@ -1,9 +1,9 @@
1
1
  defaults:
2
2
  install_options: "--no-ri --no-rdoc"
3
3
  gems:
4
- - { name: 'ruby-sqlite3', version: '>= 1.2.5' }
5
- - { name: 'cucumber', version: '>= 0.3.101' }
6
- - { name: 'rspec', version: '>= 1.2.8' }
7
- - { name: 'rspec-rails', version: '>= 1.2.7.1' }
4
+ - { name: 'sqlite3-ruby', version: '>= 1.2.5' }
5
+ - { name: 'cucumber', version: '>= 0.4.0' }
6
+ - { name: 'rspec', version: '>= 1.2.9' }
7
+ - { name: 'rspec-rails', version: '>= 1.2.9' }
8
8
  - { name: 'rails', version: '>= 2.3' }
9
9
 
@@ -62,8 +62,7 @@ class SporkDebugger
62
62
  Kernel.class_eval do
63
63
  alias :debugger_without_spork_hook :debugger
64
64
  def debugger(steps = 1)
65
- SporkDebugger.instance.prepare_debugger unless @debugger_invoked
66
- @debugger_invoked = true
65
+ SporkDebugger.instance.prepare_debugger
67
66
  debugger_without_spork_hook
68
67
  end
69
68
  end
@@ -109,6 +108,8 @@ class SporkDebugger
109
108
  end
110
109
 
111
110
  def prepare_debugger
111
+ return if @debugger_prepared
112
+ @debugger_prepared = true
112
113
  port, cport = start_rdebug_server
113
114
  signal_spork_server_to_connect_to_rdebug_server(port)
114
115
  wait_for_connection
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spork
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.2
4
+ version: 0.7.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tim Harper
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-09-24 00:00:00 -06:00
12
+ date: 2009-10-12 00:00:00 -06:00
13
13
  default_executable: spork
14
14
  dependencies: []
15
15