Sha256: dcd67c86f77d8739a60b40de13e275f2f1f4d8ff415c3d7f3bf66e1cd42062e0
Contents?: true
Size: 1.18 KB
Versions: 27
Compression:
Stored size: 1.18 KB
Contents
require 'spec_helper' describe Mutant::Mutator::Node::Assignment, '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' 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' 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' 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' end it_should_behave_like 'a mutator' end end
Version data entries
27 entries across 27 versions & 1 rubygems