spec/spec_helper.rb in wordless-0.2.1 vs spec/spec_helper.rb in wordless-0.3.0
- old
+ new
@@ -1,35 +1,13 @@
require 'wordless/cli'
require 'fakeweb'
require 'thor'
-# Set shell to basic
-# $0 = "thor"
-# $thor_runner = true
-# ARGV.clear
-# Thor::Base.shell = Thor::Shell::Basic
-
RSpec.configure do |config|
FakeWeb.allow_net_connect = false
-
- $stdout = StringIO.new
-
- # Stub Wordless::CLI#wordless_repo to avoid hitting the network when testing Wordless installation
- # FIXME - Need to be able to selectively stub this
- # config.before(:each, :stub_wordless_install => true) do
- # module Wordless
- # class CLI
- # no_tasks do
- # def wordless_repo
- # File.expand_path(File.join(File.dirname(__FILE__), 'fixtures', 'wordless_stub'))
- # end
- # end
- # end
- # end
- # end
-
FileUtils.mkdir('tmp') unless File.directory? 'tmp'
-
+
+ # utility to log commands output or errors
def capture(stream)
begin
stream = stream.to_s
eval "$#{stream} = StringIO.new"
yield