Sha256: 4efbf93ae2ce61ae34608539420326c0fa94aef5cd0f708f7907651cc100c6b9
Contents?: true
Size: 647 Bytes
Versions: 12
Compression:
Stored size: 647 Bytes
Contents
require 'spec_helper' describe Mutant::Mutator, 'begin' do # This mutation and only this mutation can result in # and empty emit that is parsed into nil, unparser cannot # handle this so we guard this here! def generate(node) return '' if node.nil? super end let(:source) { "true\nfalse" } let(:mutations) do mutations = [] # Mutation of each statement in block mutations << "true\ntrue" mutations << "false\nfalse" mutations << "nil\nfalse" mutations << "true\nnil" # Remove statement in block mutations << 'true' mutations << 'false' end it_should_behave_like 'a mutator' end
Version data entries
12 entries across 12 versions & 1 rubygems