Sha256: 845b9fad1b9b34298ab1e94c8bd2d42ed570b651e0214843a921b9b68277c432
Contents?: true
Size: 1.11 KB
Versions: 16
Compression:
Stored size: 1.11 KB
Contents
# encoding: utf-8 require 'spec_helper' describe Mutant::Mutator::Node::ConditionalLoop do context 'with while statement' do let(:source) { 'while true; foo; bar; end' } let(:mutations) do mutations = [] mutations << 'while true; bar; end' mutations << 'while true; foo; end' mutations << 'while true; end' mutations << 'while false; foo; bar; end' mutations << 'while nil; foo; bar; end' mutations << 'while true; foo; nil; end' mutations << 'while true; nil; bar; end' mutations << 'nil' end it_should_behave_like 'a mutator' end context 'with until statement' do let(:source) { 'until true; foo; bar; end' } let(:mutations) do mutations = [] mutations << 'until true; bar; end' mutations << 'until true; foo; end' mutations << 'until true; end' mutations << 'until false; foo; bar; end' mutations << 'until nil; foo; bar; end' mutations << 'until true; foo; nil; end' mutations << 'until true; nil; bar; end' mutations << 'nil' end it_should_behave_like 'a mutator' end end
Version data entries
16 entries across 16 versions & 1 rubygems