spec/spec_helper.rb in hisyo-0.0.3 vs spec/spec_helper.rb in hisyo-0.1.0

- old
+ new

@@ -1,9 +1,12 @@ require "rubygems" require "bundler/setup" Bundler.require(:default, :test) -SimpleCov.start if ENV["COVERAGE"] +if ENV["COVERAGE"] + require "simplecov" + SimpleCov.start +end require File.expand_path("../../lib/hisyo.rb", __FILE__) RSpec.configure do |conf| conf.before(:all) do @@ -31,8 +34,14 @@ return captured_stdout.string, captured_stderr.string ensure $stdout = orig_stdout $stderr = orig_stderr + end + + def generate_app(options = {}) + capture_io do + Hisyo.generate_project(options) + end end end