Sha256: 5f26608f67b2a40943bd2c4a04fbf14fa938e8bbe76cbeaa516b11549b6650ee
Contents?: true
Size: 1.95 KB
Versions: 2
Compression:
Stored size: 1.95 KB
Contents
require 'spec_helper' describe FedoraMigrate::MigrationOptions do class TestCase include FedoraMigrate::MigrationOptions end describe "#conversion_options" do subject do TestCase.new.tap do |example| example.options = { convert: 'datastream' } end end specify "sets the name of the datastream to convert" do expect(subject.conversion_options).to include "datastream" end it { is_expected.to be_not_forced } end describe "#forced?" do context "when set to true" do subject do TestCase.new.tap do |example| example.options = { convert: "datastream", force: true } end end it { is_expected.to be_forced } end context "when set to false" do subject do TestCase.new.tap do |example| example.options = { force: false } end end it { is_expected.to be_not_forced } end context "by default" do subject { TestCase.new } it { is_expected.to be_not_forced } end end describe "#application_creates_versions" do context "by default" do subject do TestCase.new.application_creates_versions? end it { is_expected.to be false } end context "when our own Hydra application creates versions" do subject do TestCase.new.tap do |example| example.options = { application_creates_versions: true } end end it { is_expected.to be_application_creates_versions } end end describe "#blacklist" do context "by default" do subject { TestCase.new.blacklist } it { is_expected.to be_empty } end context "with a list of pids" do let(:blacklist) { ["pid1, pid2"] } subject do TestCase.new.tap do |example| example.options = { blacklist: blacklist } end end it "returns the list of pids" do expect(subject.blacklist).to eql blacklist end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
fedora-migrate-0.5.0 | spec/unit/migration_options_spec.rb |
fedora-migrate-0.4.0 | spec/unit/migration_options_spec.rb |