File: inspect_spec.rb

package info (click to toggle)
ruby-necromancer 0.7.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 308 kB
  • sloc: ruby: 1,578; sh: 4; makefile: 4
file content (20 lines) | stat: -rw-r--r-- 543 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# frozen_string_literal: true

RSpec.describe Necromancer, ".inspect" do
  subject(:converter) { described_class.new }

  it "inspects converter instance" do
    expect(converter.inspect).to eq(
      "#<Necromancer::Context@#{converter.object_id} " \
      "@config=#{converter.configuration}>"
    )
  end

  it "inspects conversion target" do
    conversion = converter.convert(11)
    expect(conversion.inspect).to eq(
      "#<Necromancer::ConversionTarget@#{conversion.object_id} " \
      "@object=11, @source=integer>"
    )
  end
end