Skip to content
Browse files

Update spec/spec_helper.rb (formerly helper.rb) and set a default rak…

…e task
  • Loading branch information...
1 parent 0d1cfc2 commit 7213c40668d70b20a473598280af776096aa17d4 @nate nate committed
View
2 Rakefile
@@ -3,3 +3,5 @@ Bundler::GemHelper.install_tasks
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new
+
+task :default => :spec
View
2 spec/channel_spec.rb
@@ -1,4 +1,4 @@
-require "helper"
+require "spec_helper"
describe Agent::Channel do
# http://golang.org/doc/go_spec.html#Agent::Channel_types
View
2 spec/examples/channel_of_channels_spec.rb
@@ -1,4 +1,4 @@
-require "helper"
+require "spec_helper"
describe "Channel of Channels" do
View
2 spec/examples/producer_consumer_spec.rb
@@ -1,4 +1,4 @@
-require "helper"
+require "spec_helper"
describe "Producer-Consumer" do
it "should synchronize by communication" do
View
2 spec/examples/sieve_spec.rb
@@ -1,4 +1,4 @@
-require "helper"
+require "spec_helper"
describe "sieve of Eratosthenes" do
View
12 spec/helper.rb
@@ -1,12 +0,0 @@
-require 'timeout'
-require 'rspec'
-require 'yaml'
-
-$:.unshift File.expand_path(File.join(File.dirname(__FILE__), "..", "lib"))
-require 'agent'
-
-RSpec.configure do |c|
- c.filter_run_excluding :vm => lambda { |version|
- !(Config::CONFIG['ruby_install_name'] =~ /^#{version.to_s}/)
- }
-end
View
2 spec/queue_spec.rb
@@ -1,4 +1,4 @@
-require 'helper'
+require "spec_helper"
include Agent::Transport
describe Agent::Transport::Queue do
View
2 spec/selector_spec.rb
@@ -1,4 +1,4 @@
-require 'helper'
+require "spec_helper"
describe Agent::Selector do
# A "select" statement chooses which of a set of possible communications will
View
19 spec/spec_helper.rb
@@ -0,0 +1,19 @@
+# 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.rb"` to ensure that it is only
+# loaded once.
+#
+# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
+
+require "agent"
+require "timeout"
+
+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
+
+ config.filter_run_excluding :vm => lambda { |version|
+ !(Config::CONFIG['ruby_install_name'] =~ /^#{version.to_s}/)
+ }
+end

0 comments on commit 7213c40

Please sign in to comment.
Something went wrong with that request. Please try again.