Sha256: c0871a529b9c5cbf1906ea1c874f582ae88abd2a546be9f68830a0ab1d79affc
Contents?: true
Size: 1.75 KB
Versions: 1
Compression:
Stored size: 1.75 KB
Contents
# # File 'app_spec.rb' created on 20 feb 2008 at 20:15:42. # See 'dokkit.rb' or +LICENSE+ for licence information. # # (c)2008 Andrea Fazzi <andrea.fazzi@alca.le.it> (and contributors). # # To execute this spec run: # # spec spec/app_spec.rb # $LOAD_PATH.unshift(File.expand_path(File.join(File.dirname(__FILE__),'../lib'))) require 'rubygems' require 'spec' require 'dokkit' require 'dokkit/app' require File.dirname(__FILE__) + '/spec_helper.rb' describe Dokkit::Application, ' when initialized' do before do @app = Dokkit.application end after(:all) do Dokkit.release end it 'should instantiate a ModelTask object to manage built-in tasks' do @app.builtintask.should_not be_nil end end describe Dokkit::Application, ' running' do include CaptureStdout, SpecPathHelper before(:all) do @initial_dir = Dir.pwd Dir.chdir(File.join(File.dirname(__FILE__), SpecPathHelper::DATA_DEST_DIR)) end before do @app = Dokkit.application end after do Dokkit.release rm_rf 'spec/data/simpledocument' end after(:all) do Dir.chdir(@initial_dir) end it 'should output the list of built-in tasks' do capture_stdout do @app.do_option('--tasks', nil) @app.run end.should match(/new documentation/) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
dokkit-0.3.0 | spec/app_spec.rb |