Permalink
Browse files

add rspec

  • Loading branch information...
qqshfox committed Apr 2, 2013
1 parent f6ede65 commit f774ebe3d6f4768046c2e53d9a294ab77b07b4ab
Showing with 27 additions and 0 deletions.
  1. +2 −0 .rspec
  2. +7 −0 Rakefile
  3. +1 −0 rbuv.gemspec
  4. +17 −0 spec/spec_helper.rb
View
2 .rspec
@@ -0,0 +1,2 @@
+--color
+--format progress
View
@@ -1,8 +1,15 @@
require "bundler/gem_tasks"
require 'rake/extensiontask'
+require 'rspec/core/rake_task'
task :clean => ['deps:clean']
+RSpec::Core::RakeTask.new(:spec)
+task :spec => [:compile]
+
+desc 'Run tests'
+task :default => [:spec]
+
Rake::ExtensionTask.new('rbuv') do |ext|
ext.lib_dir = File.join('lib', 'rbuv')
ext.source_pattern = "*.{c,h}"
View
@@ -22,4 +22,5 @@ Gem::Specification.new do |spec|
spec.add_development_dependency "bundler", "~> 1.3"
spec.add_development_dependency "rake"
spec.add_development_dependency "rake-compiler"
+ spec.add_development_dependency "rspec"
end
View
@@ -0,0 +1,17 @@
+# This file was generated by the `rspec --init` command. Conventionally, all
+# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
+# Require this file using `require "spec_helper"` to ensure that it is only
+# loaded once.
+#
+# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
+RSpec.configure do |config|
+ config.treat_symbols_as_metadata_keys_with_true_values = true
+ config.run_all_when_everything_filtered = true
+ config.filter_run :focus
+
+ # Run specs in random order to surface order dependencies. If you find an
+ # order dependency and want to debug it, you can fix the order by providing
+ # the seed, which is printed after each run.
+ # --seed 1234
+ config.order = 'random'
+end

0 comments on commit f774ebe

Please sign in to comment.