Permalink
Browse files

cleanup a bunch of test files

  • Loading branch information...
fujin committed Jan 31, 2012
1 parent 3b8e64e commit 8b3392a62e0cd50d26a15f323c05f0d0ac8dcb0e
Showing with 13 additions and 16 deletions.
  1. +1 −1 Gemfile
  2. +10 −9 Rakefile
  3. +0 −2 spec/pylon/daemon_spec.rb
  4. +2 −4 spec/spec_helper.rb
View
@@ -1,7 +1,7 @@
source "http://rubygems.org"
group :test do
- gem "rspec", "~> 2.8.0"
+ gem "rspec", "~> 2.8.0", :require => false
gem "guard"
gem "guard-rspec"
end
View
@@ -3,23 +3,24 @@
require "rubygems" unless RUBY_VERSION =~ /1.9/
require "bundler"
begin
- Bundler.setup(:default, :development)
+ Bundler.setup(:default,
+ :development,
+ :test)
rescue Bundler::BundlerError => e
$stderr.puts e.message
$stderr.puts "Run `bundle install` to install missing gems"
exit e.status_code
end
+
+
require "rake"
-require "rake/testtask"
require "bundler/gem_tasks"
+require "rspec/core/rake_task"
+require "rake/testtask"
-desc "run specs"
-Rake::TestTask.new do |spec|
- spec.loader = :direct
- spec.verbose = true
- spec.name = "spec"
- spec.test_files = FileList["spec/**/*_spec.rb"]
- spec.options = "--format doc"
+RSpec::Core::RakeTask.new do |t|
+ t.verbose = true
+ t.rspec_opts = "--color --format doc"
end
task :default => %w[spec]
@@ -17,8 +17,6 @@
# limitations under the License.
require_relative "../spec_helper"
-require 'ostruct'
-require_relative "../../lib/pylon/daemon"
describe Pylon::Daemon do
before do
View
@@ -1,8 +1,6 @@
-require "rspec/autorun"
-require "rspec/mocks"
-
$:.unshift(File.join(File.dirname(__FILE__), "..", "lib"))
$:.unshift(File.expand_path("../lib", __FILE__))
$:.unshift(File.dirname(__FILE__))
-Dir[File.join(File.dirname(__FILE__), "..", "lib", "**", "*.rb")].sort.each { |lib| require lib }
+Dir[ File.join(File.dirname(__FILE__),
+ "..", "lib", "**", "*.rb") ].sort.each { |lib| require lib }

0 comments on commit 8b3392a

Please sign in to comment.