Clean output

Joel AZEMAR committed Apr 22, 2014
commit 62b5fe559c428a95cd3f1d0431ede6a19f13ec08
Showing 2 changed files with 9 additions and 8 deletions
spec/integration/cli/serve_spec.rb +3 -7
@@ @@ -1,13 +1,9 @@
-
- # encoding: utf-8
-
require File.dirname(__FILE__) + '/../integration_helper'
require 'locomotive/wagon/cli'
-
describe Locomotive::Wagon::CLI::Main do
describe '#serve' do
- let(:output) { capture(:stdout) { subject.serve path } }
+ let(:output) { capture(:stdout) { subject.serve path }}
context 'when no site in path' do
let(:path) { 'a/path/with/no/site' }
@@ @@ -16,7 +12,7 @@ describe Locomotive::Wagon::CLI::Main do
end
it 'Does not serve' do
Locomotive::Wagon.should_not_receive(:serve)
- subject.serve path
+ quietly { subject.serve path } # active_support / core_ext / kernel / reporting.rb
end
end
context 'when site in path' do
@@ @@ -32,4 +28,4 @@ describe Locomotive::Wagon::CLI::Main do
end
end
- end
\ No newline at end of file
+ end
spec/spec_helper.rb +6 -1
@@ @@ -3,6 +3,7 @@ require 'bundler/setup'
require 'launchy'
require 'coveralls'
+ require 'i18n'
require_relative '../lib/locomotive/wagon'
require_relative 'support'
@@ @@ -15,7 +16,11 @@ RSpec.configure do |config|
config.filter_run focused: true
config.run_all_when_everything_filtered = true
- config.before(:all) { remove_logs }
+ config.before(:all) do
+ I18n.enforce_available_locales = false
+ remove_logs
+ end
+
config.before { reset! }
config.after { reset! }