Sha256: efc950878bd11f9a4e5c8674cc4e57d1f9595230ff50646e6add86d37d07d320

Contents?: true

Size: 503 Bytes

Versions: 26

Compression:

Stored size: 503 Bytes

Contents

require 'spec_helper'

describe Mutant::Mutator::Node::Literal, 'float' do
  let(:source) { '10.0' }

  let(:mutations) do
    mutations = []
    mutations << 'nil'
    mutations << '0.0'
    mutations << '1.0'
    mutations << random_float.to_s
    mutations << '0.0/0.0'
    mutations << '1.0/0.0'
    mutations << '(-1.0 / 0.0)'
    mutations << '-10.0'
  end

  let(:random_float) { 7.123 }

  before do
    Mutant::Random.stub(:float => random_float)
  end

  it_should_behave_like 'a mutator'
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
mutant-0.3.0.beta21 spec/unit/mutant/mutator/node/literal/float_spec.rb
mutant-0.3.0.beta20 spec/unit/mutant/mutator/node/literal/float_spec.rb
mutant-0.3.0.beta19 spec/unit/mutant/mutator/node/literal/float_spec.rb
mutant-0.3.0.beta18 spec/unit/mutant/mutator/node/literal/float_spec.rb
mutant-0.3.0.beta17 spec/unit/mutant/mutator/node/literal/float_spec.rb
mutant-0.3.0.beta16 spec/unit/mutant/mutator/node/literal/float_spec.rb
mutant-0.3.0.beta15 spec/unit/mutant/mutator/node/literal/float_spec.rb
mutant-0.3.0.beta14 spec/unit/mutant/mutator/node/literal/float_spec.rb
mutant-0.3.0.beta13 spec/unit/mutant/mutator/node/literal/float_spec.rb
mutant-0.3.0.beta12 spec/unit/mutant/mutator/node/literal/float_spec.rb
mutant-0.3.0.beta11 spec/unit/mutant/mutator/node/literal/float_spec.rb
mutant-0.3.0.beta10 spec/unit/mutant/mutator/node/literal/float_spec.rb
mutant-0.3.0.beta9 spec/unit/mutant/mutator/node/literal/float_spec.rb
mutant-0.3.0.beta8 spec/unit/mutant/mutator/node/literal/float_spec.rb
mutant-0.3.0.beta7 spec/unit/mutant/mutator/node/literal/float_spec.rb
mutant-0.3.0.beta6 spec/unit/mutant/mutator/node/literal/float_spec.rb
mutant-0.3.0.beta5 spec/unit/mutant/mutator/node/literal/float_spec.rb
mutant-0.3.0.beta4 spec/unit/mutant/mutator/node/literal/float_spec.rb
mutant-0.3.0.beta3 spec/unit/mutant/mutator/node/literal/float_spec.rb
mutant-0.3.0.beta2 spec/unit/mutant/mutator/node/literal/float_spec.rb