Sha256: 1f623b7561a892026aa1e7273be9cb2c36f0c91a678f042f9b7c9b94bf49e5f8
Contents?: true
Size: 666 Bytes
Versions: 31
Compression:
Stored size: 666 Bytes
Contents
# encoding: utf-8 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
31 entries across 31 versions & 1 rubygems