Sha256: 56303dfd4f3f1a8e677a5f53ec70720dbde9f12737a15f98294d9a6f1121a8a0

Contents?: true

Size: 559 Bytes

Versions: 9

Compression:

Stored size: 559 Bytes

Contents

require 'spec_helper'

describe Mutant::Mutator::Node::Literal, 'array' do
  let(:source) { '[true, false]' }

  let(:mutations) do
    mutations = []

    # Literal replaced with nil
    mutations << 'nil'

    # Mutation of each element in array
    mutations << '[nil, false]'
    mutations << '[false, false]'
    mutations << '[true, nil]'
    mutations << '[true, true]'

    # Remove each element of array once
    mutations << '[true]'
    mutations << '[false]'

    # Empty array
    mutations << '[]'
  end

  it_should_behave_like 'a mutator'
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
mutant-0.3.0.beta21 spec/unit/mutant/mutator/node/literal/array_spec.rb
mutant-0.3.0.beta20 spec/unit/mutant/mutator/node/literal/array_spec.rb
mutant-0.3.0.beta19 spec/unit/mutant/mutator/node/literal/array_spec.rb
mutant-0.3.0.beta18 spec/unit/mutant/mutator/node/literal/array_spec.rb
mutant-0.3.0.beta17 spec/unit/mutant/mutator/node/literal/array_spec.rb
mutant-0.3.0.beta16 spec/unit/mutant/mutator/node/literal/array_spec.rb
mutant-0.3.0.beta15 spec/unit/mutant/mutator/node/literal/array_spec.rb
mutant-0.3.0.beta14 spec/unit/mutant/mutator/node/literal/array_spec.rb
mutant-0.3.0.beta13 spec/unit/mutant/mutator/node/literal/array_spec.rb