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.66.0-mingw32 spec/foreman/export_spec.rb
foreman-0.66.0-java spec/foreman/export_spec.rb
foreman-0.66.0 spec/foreman/export_spec.rb
foreman-0.65.0 spec/foreman/export_spec.rb
foreman-0.64.0 spec/foreman/export_spec.rb
mango-0.8.0 vendor/bundler/ruby/2.1.0/gems/foreman-0.63.0/spec/foreman/export_spec.rb
mango-0.7.1 vendor/bundler/ruby/2.0.0/gems/foreman-0.63.0/spec/foreman/export_spec.rb
mango-0.7.0 vendor/bundler/ruby/2.0.0/gems/foreman-0.63.0/spec/foreman/export_spec.rb
foreman-capistrano-0.53.4 spec/foreman/export_spec.rb
foreman-0.63.0-mingw32 spec/foreman/export_spec.rb
foreman-0.63.0-java spec/foreman/export_spec.rb
foreman-0.63.0 spec/foreman/export_spec.rb
foreman-0.62.0-mingw32 spec/foreman/export_spec.rb
foreman-0.62.0-java spec/foreman/export_spec.rb
foreman-0.62.0 spec/foreman/export_spec.rb
foreman-capistrano-0.53.3 spec/foreman/export_spec.rb
foreman-capistrano-0.53.2 spec/foreman/export_spec.rb
foreman-capistrano-0.53.1 spec/foreman/export_spec.rb
foreman-capistrano-0.53.0 spec/foreman/export_spec.rb
foreman-capistrano-0.52.6 spec/foreman/export_spec.rb