Permalink
Browse files

add guard and tweak a few things

  • Loading branch information...
dchelimsky committed Oct 14, 2010
1 parent b571cf0 commit 3ac97c58df2db21bc1a247b3b5be5b15bd4f9e35
Showing with 11 additions and 5 deletions.
  1. +1 −0 Support/Gemfile
  2. +8 −0 Support/Guardfile
  3. +2 −5 Support/spec/spec/mate/runner_spec.rb
View
@@ -5,3 +5,4 @@ gem "rspec-expectations", :path => "../../rspec-expectations"
gem "rspec-mocks", :path => "../../rspec-mocks"
gem "ruby-debug"
+gem "guard-rspec"
View
@@ -0,0 +1,8 @@
+# A sample Guardfile
+# More info at http://github.com/guard/guard#readme
+
+guard 'rspec', :version => 2 do
+ watch('^spec/(.*)_spec.rb')
+ watch('^lib/(.*)\.rb') { |m| "spec/lib/#{m[1]}_spec.rb" }
+ watch('^spec/spec_helper.rb') { "spec" }
+end
@@ -1,10 +1,10 @@
require 'spec_helper'
-require File.dirname(__FILE__) + '/../../../lib/spec/mate/runner'
+require File.expand_path('../../../../lib/spec/mate/runner', __FILE__)
require 'stringio'
describe Spec::Mate::Runner do
def set_env
- root = File.expand_path(File.dirname(__FILE__) + '../../../../../../rspec-core')
+ root = File.expand_path('../../../../../../rspec-core', __FILE__)
ENV['TM_RSPEC_HOME'] = "#{root}"
ENV['TM_PROJECT_DIRECTORY'] = File.expand_path(File.dirname(__FILE__))
ENV['TM_FILEPATH'] = nil
@@ -29,9 +29,6 @@ def set_env
$".delete_if do |path|
path =~ /example_failing_spec\.rb/
end
- # Spec::Runner.options.example_groups.delete_if do |example_group|
- # example_group.description == "An example failing spec"
- # end
end
describe "#run_file" do

0 comments on commit 3ac97c5

Please sign in to comment.