Sha256: 843e0cd6b3fbe04bd5e6795e43c9a4401505726b9e2013f06ad8c4b638e8c6aa

Contents?: true

Size: 1.06 KB

Versions: 9

Compression:

Stored size: 1.06 KB

Contents

require 'spec_helper'
require 'fedux_org/stdlib/project/generators/taskjuggler'

describe FeduxOrg::Stdlib::Project::Generators::Taskjuggler do
  context '#generate_report' do
    it "generates a report using taskjuggler" do
      directory = create_directory( 'projects' )
      plan_file = File.join( examples_directory, 'project', 'plan.tjp' )

      generator = FeduxOrg::Stdlib::Project::Generators::Taskjuggler.new

      switch_to_working_directory do
        silence( :stderr ) do
          generator.generate_report( directory, plan_file )
        end
      end
    end

    it "fails if an error occured while generating the report" do
      directory = create_directory( 'projects' )
      plan_file = File.join( examples_directory, 'project', 'plan_does_not_exist.tjp' )

      generator = FeduxOrg::Stdlib::Project::Generators::Taskjuggler.new

      expect {
        switch_to_working_directory do
          silence( :stderr) do
            generator.generate_report( directory, plan_file )
          end

        end
      }.to raise_error SystemExit

    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
fedux_org-stdlib-0.3.2 spec/project/taskjuggler_spec.rb
fedux_org-stdlib-0.3.0 spec/project/taskjuggler_spec.rb
fedux_org-stdlib-0.2.1 spec/project/taskjuggler_spec.rb
fedux_org-stdlib-0.1.3 spec/project/taskjuggler_spec.rb
fedux_org-stdlib-0.1.2 spec/project/taskjuggler_spec.rb
fedux_org-stdlib-0.1.1 spec/project/taskjuggler_spec.rb
fedux_org-stdlib-0.1.0 spec/project/taskjuggler_spec.rb
fedux_org-stdlib-0.0.39 spec/project/taskjuggler_spec.rb
fedux_org-stdlib-0.0.38 spec/project/taskjuggler_spec.rb