File: succes_spec.rb

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

RSpec.describe Morpher::Transform::Success do
  subject { described_class.new(block) }

  let(:block) { ->(value) { value.to_s } }

  describe '#call' do
    def apply
      subject.call(input)
    end

    context 'on any input' do
      let(:input) { 100 }

      it 'returns sucess on block output' do
        expect(apply).to eql(right('100'))
      end
    end
  end
end