Sha256: a1c8161763c2f98ba59fd22f792956751d99897cdc8b05c2e74c5612309bd4e0

Contents?: true

Size: 698 Bytes

Versions: 4

Compression:

Stored size: 698 Bytes

Contents

require File.expand_path("../../base", __FILE__)

describe Vagrant::Errors::VagrantError do
  describe "subclass with error key" do
    let(:klass) do
      Class.new(described_class) do
        error_key("test_key")
      end
    end

    subject { klass.new }

    it "should use the translation for the message" do
      subject.to_s.should == "test value"
    end

    its("status_code") { should eq(1) }
  end

  describe "subclass with error message" do
    let(:klass) do
      Class.new(described_class) do
        error_message("foo")
      end
    end

    subject { klass.new }

    it "should use the translation for the message" do
      subject.to_s.should == "foo"
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
tamtam-vagrant-reload-1.1.3 vendor/cache/vagrant-0ac2a8738841/test/unit/vagrant/errors_test.rb
tamtam-vagrant-reload-1.1.2 vendor/cache/vagrant-0ac2a8738841/test/unit/vagrant/errors_test.rb
tamtam-vagrant-reload-1.1.1 vendor/cache/vagrant-0ac2a8738841/test/unit/vagrant/errors_test.rb
tamtam-vagrant-reload-1.1 vendor/cache/vagrant-0ac2a8738841/test/unit/vagrant/errors_test.rb