free_mutant/spec/unit/mutant/mutator/node/binary_spec.rb

42 lines
801 B
Ruby
Raw Normal View History

# encoding: utf-8
2013-07-24 01:58:53 -04:00
require 'spec_helper'
describe Mutant::Mutator::Node::Binary, 'mutations' do
2013-07-24 01:58:53 -04:00
context 'and' do
let(:source) { 'true and false' }
let(:mutations) do
mutations = []
mutations << 'nil'
mutations << 'true'
mutations << 'false'
mutations << 'true or false'
mutations << 'not true and false'
mutations << 'not(true and false)'
2013-07-24 01:58:53 -04:00
end
it_should_behave_like 'a mutator'
end
context 'or' do
let(:source) { 'true or false' }
let(:mutations) do
mutations = []
mutations << 'nil'
mutations << 'true'
mutations << 'false'
mutations << 'true and false'
mutations << 'not true or false'
mutations << 'not(true or false)'
2013-07-24 01:58:53 -04:00
end
it_should_behave_like 'a mutator'
end
end