Sha256: 0288a4eddf2d67d23973da75d0cc035f513db61c28563682e6014d026e5e68fa

Contents?: true

Size: 501 Bytes

Versions: 5

Compression:

Stored size: 501 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

5 entries across 5 versions & 1 rubygems

Version Path
mutant-0.2.5 spec/unit/mutant/mutator/node/literal/float_spec.rb
mutant-0.2.4 spec/unit/mutant/mutator/node/literal/float_spec.rb
mutant-0.2.3 spec/unit/mutant/mutator/node/literal/float_spec.rb
mutant-0.2.2 spec/unit/mutant/mutator/node/literal/float_spec.rb
mutant-0.2.1 spec/unit/mutant/mutator/node/literal/float_spec.rb