Sha256: ebd25994142b0a3f182d90d52da262725ac34ba1e0358a4efb6cb272e7cf4512

Contents?: true

Size: 668 Bytes

Versions: 7

Compression:

Stored size: 668 Bytes

Contents

# frozen_string_literal: true

describe PageMagic::Element::NotFound do
  describe '#method_missing' do
    it 'raises an error' do
      subject = described_class.new(Exception.new('message'))
      expect { subject.any_missing_method }.to raise_exception(PageMagic::ElementMissingException, 'message')
    end
  end

  describe '#visible?' do
    it 'returns false' do
      subject = described_class.new(Exception.new('message'))
      expect(subject.visible?).to eq(false)
    end
  end

  describe '#present?' do
    it 'returns false' do
      subject = described_class.new(Exception.new('message'))
      expect(subject.present?).to eq(false)
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
page_magic-2.0.6 spec/page_magic/element/not_found_spec.rb
page_magic-2.0.5 spec/page_magic/element/not_found_spec.rb
page_magic-2.0.4 spec/page_magic/element/not_found_spec.rb
page_magic-2.0.3 spec/page_magic/element/not_found_spec.rb
page_magic-2.0.2 spec/page_magic/element/not_found_spec.rb
page_magic-2.0.1 spec/page_magic/element/not_found_spec.rb
page_magic-2.0.0 spec/page_magic/element/not_found_spec.rb