Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ group :development do
gem 'listen'
gem 'roodi'
gem 'solargraph'
gem 'spork', git: 'https://github.com/sporkrb/spork', ref: '224df49' # '~> 1.0rc'
gem 'spring'
gem 'spring-commands-rspec'
end
8 changes: 0 additions & 8 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,6 @@ GIT
azure-core (~> 0.1.13)
nokogiri (~> 1.6, >= 1.6.8)

GIT
remote: https://github.com/sporkrb/spork
revision: 224df492657e617a0c93c0319e78f0eefee5b636
ref: 224df49
specs:
spork (1.0.0rc4)

GEM
remote: https://rubygems.org/
specs:
Expand Down Expand Up @@ -693,7 +686,6 @@ DEPENDENCIES
sinatra (~> 4.2)
sinatra-contrib
solargraph
spork!
spring
spring-commands-rspec
statsd-ruby (~> 1.5.0)
Expand Down
29 changes: 0 additions & 29 deletions scripts/file_watcher.rb

This file was deleted.

24 changes: 0 additions & 24 deletions spec/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,27 +159,3 @@ real 18.628 2.077 13.934 19.062 21.821
user 0.177 0.032 0.129 0.185 0.233
sys 0.103 0.014 0.078 0.107 0.126
```

#### Spork (Legacy)

Spork is an older implementation of the same "forking" strategy implemented by Spring.

### Running Individual Tests

In one terminal, change to the `Cloud Controller` root directory and run `bundle exec spork`

In a separate terminal, you can run selected unit tests quickly by running them with the `--drb` option, as in:

bundle exec rspec --drb spec/unit/models/services/service_plan_visibility_spec.rb

You can configure your IDE to take advantage of spork by inserting the `--drb` option. If `spork` isn't running `rspec` will ignore the `--drb` option and run the test the usual slower way.

Press Ctrl-C in the first terminal to stop running `spork`.

### Running Tests Automatically When Files Change

In one terminal, change to the `Cloud Controller` root directory and run `bundle exec scripts/file-watcher.rb`

As files change, they, or their related spec files, will be run automatically.

Press Ctrl-C to stop running `file-watcher.rb`.
27 changes: 2 additions & 25 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,5 @@
require 'mock_redis'
require 'spec_helper_helper'

begin
require 'spork'
# uncomment the following line to use spork with the debugger
# require 'spork/ext/ruby-debug'

run_spork = !`ps | grep spork | grep -v grep`.empty?
rescue LoadError
run_spork = false
end

if run_spork
Spork.prefork do
# Loading more in this block will cause your tests to run faster. However,
# if you change any configuration or code from libraries loaded here, you'll
# need to restart spork for it to take effect.
SpecHelperHelper.init
end
Spork.each_run do
# This code will be run each time you run your specs.
SpecHelperHelper.each_run
end
else
SpecHelperHelper.init
SpecHelperHelper.each_run
end
SpecHelperHelper.init
SpecHelperHelper.each_run