Sha256: 826d4995a423e931be281eb76e820a109fc37e78dc5842036b5714a077c6db24

Contents?: true

Size: 503 Bytes

Versions: 6

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

6 entries across 6 versions & 1 rubygems

Version Path
mutant-0.2.12 spec/unit/mutant/mutator/node/literal/float_spec.rb
mutant-0.2.11 spec/unit/mutant/mutator/node/literal/float_spec.rb
mutant-0.2.9 spec/unit/mutant/mutator/node/literal/float_spec.rb
mutant-0.2.8 spec/unit/mutant/mutator/node/literal/float_spec.rb
mutant-0.2.7 spec/unit/mutant/mutator/node/literal/float_spec.rb
mutant-0.2.6 spec/unit/mutant/mutator/node/literal/float_spec.rb