Sha256: ca1b9ce30e4fafbdae2f701f01250b25691b3f5fbaa5f675668efaa540b3f453

Contents?: true

Size: 889 Bytes

Versions: 29

Compression:

Stored size: 889 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe Mutant::Mutator, 'super' do

  context 'with no arguments' do
    let(:source) { 'super' }

    let(:mutations) do
      mutations = []
      mutations << 'nil'
    end

    it_should_behave_like 'a mutator'
  end

  context 'with explicit empty arguments' do
    let(:source) { 'super()' }

    let(:mutations) do
      mutations = []
      mutations << 'super'
      mutations << 'nil'
    end

    it_should_behave_like 'a mutator'
  end

  context 'super with arguments' do
    let(:source) { 'super(foo, bar)' }

    let(:mutations) do
      mutations = []
      mutations << 'super'
      mutations << 'super()'
      mutations << 'super(foo)'
      mutations << 'super(bar)'
      mutations << 'super(foo, nil)'
      mutations << 'super(nil, bar)'
      mutations << 'nil'
    end

    it_should_behave_like 'a mutator'
  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
mutant-0.5.17 spec/unit/mutant/mutator/node/super_spec.rb
mutant-0.5.16 spec/unit/mutant/mutator/node/super_spec.rb
mutant-0.5.15 spec/unit/mutant/mutator/node/super_spec.rb
mutant-0.5.14 spec/unit/mutant/mutator/node/super_spec.rb
mutant-0.5.13 spec/unit/mutant/mutator/node/super_spec.rb
mutant-0.5.12 spec/unit/mutant/mutator/node/super_spec.rb
mutant-0.5.11 spec/unit/mutant/mutator/node/super_spec.rb
mutant-0.5.10 spec/unit/mutant/mutator/node/super_spec.rb
mutant-0.5.9 spec/unit/mutant/mutator/node/super_spec.rb
mutant-0.5.8 spec/unit/mutant/mutator/node/super_spec.rb
mutant-0.5.7 spec/unit/mutant/mutator/node/super_spec.rb
mutant-0.5.6 spec/unit/mutant/mutator/node/super_spec.rb
mutant-0.5.5 spec/unit/mutant/mutator/node/super_spec.rb
mutant-0.5.4 spec/unit/mutant/mutator/node/super_spec.rb
mutant-0.5.3 spec/unit/mutant/mutator/node/super_spec.rb
mutant-0.5.2 spec/unit/mutant/mutator/node/super_spec.rb
mutant-0.5.1 spec/unit/mutant/mutator/node/super_spec.rb
mutant-0.5.0 spec/unit/mutant/mutator/node/super_spec.rb
mutant-0.3.6 spec/unit/mutant/mutator/node/super_spec.rb
mutant-0.3.5 spec/unit/mutant/mutator/node/super_spec.rb