Skip to content

Commit bd40349

Browse files
author
Nicolas
committed
Add Guard and Spork gems
1 parent 8568a28 commit bd40349

File tree

4 files changed

+35
-3
lines changed

4 files changed

+35
-3
lines changed

Diff for: .gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
.*.swp
22
/selinux/tmp
3-
3+
Gemfile.lock
4+
/tmp

Diff for: Gemfile

+3-1
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,7 @@ gem 'wikicloth'
1111
gem 'asciidoctor'
1212

1313
group :development, :test do
14-
gem 'rspec', '2.14.1'
14+
gem 'rspec', '2.14.1'
15+
gem 'guard-rspec', '2.6.0'
16+
gem 'guard-spork', '1.5.1'
1517
end

Diff for: Guardfile

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# More info at https://github.com/guard/guard#readme
2+
3+
guard 'rspec' do
4+
watch(%r{^spec/.+_spec\.rb$})
5+
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
6+
watch('spec/spec_helper.rb') { "spec" }
7+
end
8+
9+
guard 'spork', :rspec_env => { 'RAILS_ENV' => 'test' } do
10+
watch(%r{^lib/(.+)\.rb$})
11+
watch('Gemfile.lock')
12+
watch('spec/spec_helper.rb') { :rspec }
13+
end

Diff for: spec/spec_helper.rb

+17-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,17 @@
1-
require File.expand_path('../../lib/redmine_gitolite/config', __FILE__)
1+
require 'rubygems'
2+
require 'spork'
3+
4+
#uncomment the following line to use spork with the debugger
5+
#require 'spork/ext/ruby-debug'
6+
7+
Spork.prefork do
8+
# Loading more in this block will cause your tests to run faster. However,
9+
# if you change any configuration or code from libraries loaded here, you'll
10+
# need to restart spork for it take effect.
11+
require File.expand_path('../../lib/redmine_gitolite/config', __FILE__)
12+
end
13+
14+
Spork.each_run do
15+
# This code will be run each time you run your specs.
16+
17+
end

0 commit comments

Comments
 (0)