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.39.0-java spec/foreman/export_spec.rb
foreman-0.39.0 spec/foreman/export_spec.rb
foreman-0.38.0-mingw32 spec/foreman/export_spec.rb
foreman-0.38.0-java spec/foreman/export_spec.rb
foreman-0.38.0 spec/foreman/export_spec.rb
foreman-0.37.2-mingw32 spec/foreman/export_spec.rb
foreman-0.37.2-java spec/foreman/export_spec.rb
foreman-0.37.2 spec/foreman/export_spec.rb
foreman-0.37.1-mingw32 spec/foreman/export_spec.rb
foreman-0.37.1-java spec/foreman/export_spec.rb
foreman-0.37.1 spec/foreman/export_spec.rb
foreman-0.37.0-mingw32 spec/foreman/export_spec.rb
foreman-0.37.0-java spec/foreman/export_spec.rb
foreman-0.37.0 spec/foreman/export_spec.rb