Sha256: a5d85d8b848e778f412b6722e8491efecdd779787e50881e5338a7df99652f3b

Contents?: true

Size: 736 Bytes

Versions: 114

Compression:

Stored size: 736 Bytes

Contents

require "spec_helper"
require "foreman/export"

describe "Foreman::Export" do
  subject { Foreman::Export }

  describe "with a formatter that doesn't declare the appropriate class" do
    it "prints an error" do
      mock(subject).require("foreman/export/invalidformatter")
      mock_export_error("Unknown export format: invalidformatter (no class Foreman::Export::Invalidformatter).") do
        subject.formatter("invalidformatter") 
      end
    end
  end

  describe "with an invalid formatter" do

    it "prints an error" do
      mock_export_error("Unknown export format: invalidformatter (unable to load file 'foreman/export/invalidformatter').") do
        subject.formatter("invalidformatter")
      end
    end
  end
end

Version data entries

114 entries across 114 versions & 5 rubygems

Version Path
foreman-0.55.0 spec/foreman/export_spec.rb
foreman-0.54.0 spec/foreman/export_spec.rb
foreman-capistrano-0.51.1 spec/foreman/export_spec.rb
foreman-capistrano-0.51.0 spec/foreman/export_spec.rb
foreman-0.53.0-java spec/foreman/export_spec.rb
foreman-0.53.0 spec/foreman/export_spec.rb
foreman-0.52.0-java spec/foreman/export_spec.rb
foreman-0.52.0 spec/foreman/export_spec.rb
foreman-0.51.0-java spec/foreman/export_spec.rb
foreman-0.51.0 spec/foreman/export_spec.rb
foreman-0.50.0-x86-mingw32 spec/foreman/export_spec.rb
foreman-0.50.0-x86-mswin32 spec/foreman/export_spec.rb
foreman-0.50.0-mingw32 spec/foreman/export_spec.rb
foreman-0.50.0-java spec/foreman/export_spec.rb
foreman-0.50.0 spec/foreman/export_spec.rb
foreman-0.49.0 spec/foreman/export_spec.rb
foreman-0.48.0 spec/foreman/export_spec.rb
foreman-0.48.0.pre3 spec/foreman/export_spec.rb
foreman-0.48.0.pre2 spec/foreman/export_spec.rb
foreman-0.48.0.pre1-java spec/foreman/export_spec.rb