spin 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/bin/spin +12 -2
  2. metadata +4 -4
data/bin/spin CHANGED
@@ -79,8 +79,18 @@ def serve
79
79
  puts
80
80
  puts "Loading #{file}"
81
81
 
82
- # We require the full path of the file here in the child process.
83
- require File.expand_path file
82
+ # Unfortunately rspec's interface isn't as simple as just requiring the
83
+ # test file that you want to run (suddenly test/unit seems like the less
84
+ # crazy one!).
85
+ if defined?(RSpec)
86
+ # We pretend the filepath came in as an argument and duplicate the
87
+ # behaviour of the `rspec` binary.
88
+ ARGV.push file
89
+ require 'rspec/autorun'
90
+ else
91
+ # We require the full path of the file here in the child process.
92
+ require File.expand_path file
93
+ end
84
94
  end
85
95
 
86
96
  # We don't want the parent process handling multiple test runs at the same
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spin
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 0
10
- version: 0.1.0
9
+ - 1
10
+ version: 0.1.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jesse Storimer
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-10-28 00:00:00 -04:00
18
+ date: 2011-10-31 00:00:00 -04:00
19
19
  default_executable:
20
20
  dependencies: []
21
21