Sha256: d6d2672894eef9e10e52e55db0517f611e4a575ff69bb80407c5632b2f06b288
Contents?: true
Size: 596 Bytes
Versions: 78
Compression:
Stored size: 596 Bytes
Contents
# frozen_string_literal: true require "spec_helper" shared_examples_for "publicable" do let(:factory_name) { described_class.name.demodulize.underscore.to_sym } let!(:published) do create(factory_name, published_at: Time.current) end let!(:unpublished) do create(factory_name, published_at: nil) end describe ".published" do let(:scope) { described_class.send(:published) } it { expect(scope).to eq([published]) } end describe ".unpublished" do let(:scope) { described_class.send(:unpublished) } it { expect(scope).to eq([unpublished]) } end end
Version data entries
78 entries across 78 versions & 1 rubygems