Sha256: 6c82a21a0c3cc24798cc388d04e6827d8ebb23993b631a8b083d3b855fed1307

Contents?: true

Size: 384 Bytes

Versions: 2

Compression:

Stored size: 384 Bytes

Contents

# frozen_string_literal: true

require 'rails_helper'

RSpec.describe Normalizy::RSpec::Matcher, '.from' do
  let!(:matcher) { described_class.new :name }
  let!(:model)   { User }

  it 'caches the value' do
    matcher.from :from

    expect(matcher.instance_variable_get(:@from)).to eq :from
  end

  it 'returns it self' do
    expect(matcher.from(:from)).to be matcher
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
normalizy-0.2.0 spec/normalizy/rspec/matcher/from_spec.rb
normalizy-0.1.0 spec/normalizy/rspec/matcher/from_spec.rb