free_mutant/spec/unit/mutant/mutator/literal/float_spec.rb
Markus Schirp bb9809fa39 Reorganize unit specs.
* The old nameing did not make any sense. Sorry for not useing git mv.
2012-08-01 14:13:57 +02:00

25 lines
568 B
Ruby

require 'spec_helper'
describe Mutant::Mutator::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 << [:negate, [:call, [:lit, 1.0], :/, [:arglist, [:lit, 0.0]]]]
mutations << [:lit, -10.0]
end
let(:random_float) { 7.123 }
before do
Mutant::Random.stub(:float => random_float)
end
it_should_behave_like 'a mutation enumerator method'
end