Sha256: 701d1ae975ca653ad5b2669ab711b4a2391e357ce9d1868c22a0ed251f316005

Contents?: true

Size: 994 Bytes

Versions: 56

Compression:

Stored size: 994 Bytes

Contents

# encoding: utf-8
require 'spec_helper'
require 'fedux_org_stdlib/project/generators/taskjuggler'

RSpec.describe FeduxOrgStdlib::Project::Generators::Taskjuggler do
  context '#generate_report' do
    before :each do
      create_dir('projects')
    end

    let(:directory) { absolute_path('projects') }

    it 'generates a report using taskjuggler' do
      plan_file = File.join(examples_directory, 'project', 'plan.tjp')

      generator = FeduxOrgStdlib::Project::Generators::Taskjuggler.new

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

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

      generator = FeduxOrgStdlib::Project::Generators::Taskjuggler.new

      expect do
        silence(:stderr) do
          generator.generate_report(directory, plan_file)
        end
      end.to raise_error SystemExit
    end
  end
end

Version data entries

56 entries across 56 versions & 1 rubygems

Version Path
fedux_org-stdlib-0.10.6 spec/project/taskjuggler_spec.rb
fedux_org-stdlib-0.10.5 spec/project/taskjuggler_spec.rb
fedux_org-stdlib-0.10.4 spec/project/taskjuggler_spec.rb
fedux_org-stdlib-0.10.3 spec/project/taskjuggler_spec.rb
fedux_org-stdlib-0.10.2 spec/project/taskjuggler_spec.rb
fedux_org-stdlib-0.10.1 spec/project/taskjuggler_spec.rb
fedux_org-stdlib-0.10.0 spec/project/taskjuggler_spec.rb
fedux_org-stdlib-0.9.8 spec/project/taskjuggler_spec.rb
fedux_org-stdlib-0.9.7 spec/project/taskjuggler_spec.rb
fedux_org-stdlib-0.9.6 spec/project/taskjuggler_spec.rb
fedux_org-stdlib-0.9.5 spec/project/taskjuggler_spec.rb
fedux_org-stdlib-0.9.4 spec/project/taskjuggler_spec.rb
fedux_org-stdlib-0.9.2 spec/project/taskjuggler_spec.rb
fedux_org-stdlib-0.9.1 spec/project/taskjuggler_spec.rb
fedux_org-stdlib-0.9.0 spec/project/taskjuggler_spec.rb
fedux_org-stdlib-0.8.11 spec/project/taskjuggler_spec.rb
fedux_org-stdlib-0.8.10 spec/project/taskjuggler_spec.rb
fedux_org-stdlib-0.8.9 spec/project/taskjuggler_spec.rb
fedux_org-stdlib-0.8.8 spec/project/taskjuggler_spec.rb
fedux_org-stdlib-0.8.7 spec/project/taskjuggler_spec.rb