Sha256: 71e64930b00e63b59398ba897e19d682e8446a12a141faed6b48f623f26188d2
Contents?: true
Size: 1.03 KB
Versions: 3
Compression:
Stored size: 1.03 KB
Contents
require "test_helper" class Replication::Modules::SemiConservativeTest < ActiveSupport::TestCase test "unwound with default options" do Organism.can_replicate organism = organism_object strand = organism.unwound(name: 'First bacteria') assert_equal organism.strand_attributes, strand.pairs end test "replicate with default options" do Organism.can_replicate organism = organism_object strand = organism.replicate(name: 'First bacteria') assert_equal organism.strand_attributes, strand.pairs end test "unwound with whitelist" do Organism.can_replicate only: [:name] organism = organism_object strand = organism.replicate(name: 'First bacteria') assert_equal ({ name: 'Bacteria' }), strand.pairs end test "unwound with blacklist" do Organism.can_replicate except: [:id, :number_of_legs, :birth_date, :created_at, :updated_at] organism = organism_object strand = organism.replicate(name: 'First bacteria') assert_equal ({ name: 'Bacteria' }), strand.pairs end end
Version data entries
3 entries across 3 versions & 1 rubygems