Sha256: 3830f1061880b40ccda65e60178c32ae2fa26eef49cde767d3014bfc5730f1f2

Contents?: true

Size: 765 Bytes

Versions: 2

Compression:

Stored size: 765 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'
    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)'
    end

    it_should_behave_like 'a mutator'
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
mutant-0.3.0.rc1 spec/unit/mutant/mutator/node/super/mutation_spec.rb
mutant-0.3.0.beta22 spec/unit/mutant/mutator/node/super/mutation_spec.rb