Skip to content

Commit

Permalink
made RSpec output less verbose
Browse files Browse the repository at this point in the history
  • Loading branch information
dtao committed Jul 24, 2014
1 parent 85091bd commit 7080955
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
7 changes: 5 additions & 2 deletions Rakefile
Expand Up @@ -6,18 +6,21 @@ task :spec => ['spec:app', 'spec:lib']
namespace :spec do
desc "Run only specs tagged 'solo'"
RSpec::Core::RakeTask.new(:solo) do |t|
t.verbose = false
t.rspec_opts = %w(--color --tag solo)
end

desc "Run only specs tagged NOT tagged 'libraries' (for applications)"
RSpec::Core::RakeTask.new(:app) do |t|
puts "Running specs w/ monkeypatch"
t.verbose = false
ENV["MONKEYPATCH_YAML"] = "true"
t.rspec_opts = %w(--color --tag ~libraries)
end

desc "Run only specs tagged 'libraries'"
RSpec::Core::RakeTask.new(:lib) do |t|
puts "Running specs w/o monkeypatch"
t.verbose = false
ENV["MONKEYPATCH_YAML"] = "false"
t.rspec_opts = %w(--color --tag libraries)
end
end
12 changes: 6 additions & 6 deletions spec/spec_helper.rb
Expand Up @@ -13,13 +13,13 @@
yaml_engine = defined?(YAML::ENGINE) ? YAML::ENGINE.yamler : "syck"
libyaml_version = yaml_engine == "psych" && Psych.const_defined?("LIBYAML_VERSION", false) ? Psych::LIBYAML_VERSION : "N/A"

puts <<-EOM
env_info = [
ruby_version,
"YAML: #{yaml_engine} (#{YAML::VERSION}) (libyaml: #{libyaml_version})",
"Monkeypatch: #{ENV['MONKEYPATCH_YAML']}"
]

Running #{ruby_version} with '#{yaml_engine}' YAML engine.
YAML engine version: #{YAML::VERSION}
libyaml version: #{libyaml_version}
EOM
puts env_info.join(", ")

# Caching references to these methods before loading safe_yaml in order to test
# that they aren't touched unless you actually require safe_yaml (see yaml_spec.rb).
Expand Down

0 comments on commit 7080955

Please sign in to comment.