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
ypadlyak-foreman-0.81.0 spec/foreman/export_spec.rb
foreman-systemd-0.78.0 spec/foreman/export_spec.rb
foreman-0.82.0 spec/foreman/export_spec.rb
foreman-0.81.0 spec/foreman/export_spec.rb
foreman-0.80.2 spec/foreman/export_spec.rb
foreman-0.80.1 spec/foreman/export_spec.rb
foreman-0.80.0 spec/foreman/export_spec.rb
foreman-0.78.0 spec/foreman/export_spec.rb
foreman-0.77.0 spec/foreman/export_spec.rb
foreman-0.76.0 spec/foreman/export_spec.rb
foreman-0.75.0 spec/foreman/export_spec.rb
foreman-0.74.0 spec/foreman/export_spec.rb
foreman-0.73.0 spec/foreman/export_spec.rb
foreman-0.71.0 spec/foreman/export_spec.rb
foreman-0.70.0 spec/foreman/export_spec.rb
foreman-0.69.0-mingw32 spec/foreman/export_spec.rb
foreman-0.69.0 spec/foreman/export_spec.rb
foreman-0.67.0-mingw32 spec/foreman/export_spec.rb
foreman-0.67.0-java spec/foreman/export_spec.rb
foreman-0.67.0 spec/foreman/export_spec.rb