Sha256: 86c85f1e95979bf19b054fc240b621868241930fd74d84cc37d290257c633d7b
Contents?: true
Size: 1.31 KB
Versions: 24
Compression:
Stored size: 1.31 KB
Contents
# encoding: utf-8 require 'spec_helper' describe Mutant::Mutator::Node::NamedValue::VariableAssignment, 'mutations' do before do Mutant::Random.stub(hex_string: 'random') end context 'global variable' do let(:source) { '$a = true' } let(:mutations) do mutations = [] mutations << '$srandom = true' mutations << '$a = false' mutations << '$a = nil' mutations << 'nil' end it_should_behave_like 'a mutator' end context 'class variable' do let(:source) { '@@a = true' } let(:mutations) do mutations = [] mutations << '@@srandom = true' mutations << '@@a = false' mutations << '@@a = nil' mutations << 'nil' end it_should_behave_like 'a mutator' end context 'instance variable' do let(:source) { '@a = true' } let(:mutations) do mutations = [] mutations << '@srandom = true' mutations << '@a = false' mutations << '@a = nil' mutations << 'nil' end it_should_behave_like 'a mutator' end context 'local variable' do let(:source) { 'a = true' } let(:mutations) do mutations = [] mutations << 'srandom = true' mutations << 'a = false' mutations << 'a = nil' mutations << 'nil' end it_should_behave_like 'a mutator' end end
Version data entries
24 entries across 24 versions & 1 rubygems