spork 0.5.7 → 0.5.8

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -8,10 +8,25 @@
8
8
 
9
9
  == SYNOPSIS:
10
10
 
11
- Spork is Tim Harper's implementation of a Drb spec server (similar to the script/spec_server provided by rspec-rails), except rather than using the Rails constant unloading to reload your files, it forks a copy of the server each time you run your specs. The result? Spork runs more solid: it doesn't get corrupted over time, and it properly handles modules and any voo-doo meta programming you may have put in your app.
11
+ Spork is Tim Harper's implementation of test server (similar to the script/spec_server provided by rspec-rails), except rather than using the Rails constant unloading to reload your files, it forks a copy of the server each time you run your tests. The result? Spork runs more solid: it doesn't get corrupted over time, and it properly handles modules and any voo-doo meta programming you may have put in your app.
12
12
 
13
13
  Because Spork uses Kernel.fork, it only works on POSIX systems. This means Windows users are not invited to this party. Sorry :(
14
14
 
15
+ == Supported Testing Frameworks
16
+
17
+ * Rspec
18
+ * Cucumber
19
+
20
+ And more to come! Vote for your favorite at http://github.com/timcharper/spork/issues
21
+
22
+ == Supported Application Frameworks
23
+
24
+ Actually, Spork ~can~ work with any application framework. But, it ships with hooks and helpers to help make the experience much more "out of the box"
25
+
26
+ * Rails
27
+
28
+ More can be added! Vote for your favorite at http://github.com/timcharper/spork/issues
29
+
15
30
  == INSTALL:
16
31
 
17
32
  [sudo] gem install spork
@@ -74,27 +89,7 @@ Use this as a guideline when "Sporking" your features/support/env.rb file
74
89
 
75
90
  == Some potential issues and ways to overcome them:
76
91
 
77
- === Database connections don't work inside of Spork
78
-
79
- If you're using ActiveRecord and Rails, Spork will automatically reconnect to the database. However, if you're not using ActiveRecord, or if you're doing some tricky stuff with connections, you'll have to make sure your connections get re-established on each run. In your spec/spec_helper.rb file:
80
-
81
- Spork.each_run do
82
- # Do your connection re-establishing here
83
- end
84
-
85
- === Couldn't find formatter class Spec::Runner::Formatter::TextMateFormatter
86
-
87
- Make sure the --require option is specified *before* --format
88
-
89
- On one of our projects, many of us using TextMate with spork, only one developer got this error message while the rest of us ran just fine. I don't know exactly why it happened, but requiring the textmate formatter in the prefork block made it go away, like this:
90
-
91
- Spork.prefork do
92
- gem "rspec", "= 1.2.6"
93
- require 'spec'
94
- ...
95
- require 'spec/runner/formatter/text_mate_formatter'
96
- ...
97
- end
92
+ See http://wiki.github.com/timcharper/spork/troubleshooting
98
93
 
99
94
  == Kudos to
100
95
 
data/bin/spork CHANGED
File without changes
@@ -1,28 +1,34 @@
1
1
  class Spork::Server::Cucumber < Spork::Server
2
2
  CUCUMBER_PORT = 8990
3
3
  CUCUMBER_HELPER_FILE = File.join(Dir.pwd, "features/support/env.rb")
4
-
4
+
5
5
  class << self
6
6
  def port
7
7
  CUCUMBER_PORT
8
8
  end
9
-
9
+
10
10
  def helper_file
11
11
  CUCUMBER_HELPER_FILE
12
12
  end
13
13
 
14
+ # REMOVE WHEN SUPPORT FOR PRE-0.4 IS DROPPED
14
15
  attr_accessor :step_mother
15
16
  end
16
-
17
+
18
+ # REMOVE WHEN SUPPORT FOR PRE-0.4 IS DROPPED
17
19
  def step_mother
18
20
  self.class.step_mother
19
21
  end
20
-
22
+
21
23
  def run_tests(argv, stderr, stdout)
22
- require 'cucumber/cli/main'
23
- ::Cucumber::Cli::Main.step_mother = step_mother
24
- ::Cucumber::Cli::Main.new(argv, stdout, stderr).execute!(step_mother)
24
+ begin
25
+ require 'cucumber/cli/main'
26
+ ::Cucumber::Cli::Main.new(argv, stdout, stderr).execute!(::Cucumber::StepMother.new)
27
+ rescue NoMethodError => pre_cucumber_0_4 # REMOVE WHEN SUPPORT FOR PRE-0.4 IS DROPPED
28
+ ::Cucumber::Cli::Main.step_mother = step_mother
29
+ ::Cucumber::Cli::Main.new(argv, stdout, stderr).execute!(step_mother)
30
+ end
25
31
  end
26
32
  end
27
33
 
28
- Spork::Server::Cucumber.step_mother = self
34
+ Spork::Server::Cucumber.step_mother = self # REMOVE WHEN SUPPORT FOR PRE-0.4 IS DROPPED
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.5.7
4
+ version: 0.5.8
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-06-17 00:00:00 -06:00
12
+ date: 2009-08-13 00:00:00 -06:00
13
13
  default_executable: spork
14
14
  dependencies: []
15
15
 
@@ -61,6 +61,8 @@ files:
61
61
  - spec/spork_spec.rb
62
62
  has_rdoc: true
63
63
  homepage: http://github.com/timcharper/spork
64
+ licenses: []
65
+
64
66
  post_install_message:
65
67
  rdoc_options:
66
68
  - --main
@@ -82,9 +84,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
82
84
  requirements: []
83
85
 
84
86
  rubyforge_project: spork
85
- rubygems_version: 1.3.1
87
+ rubygems_version: 1.3.4
86
88
  signing_key:
87
- specification_version: 2
89
+ specification_version: 3
88
90
  summary: spork
89
91
  test_files:
90
92
  - spec/spec_helper.rb