From d6165b3525ca1fcd957249627ae01d2028a39ce8 Mon Sep 17 00:00:00 2001 From: Markus Schirp Date: Thu, 16 Aug 2012 22:49:47 +0200 Subject: [PATCH] Remove sample subjects --- spec/support/sample_subjects.rb | 6 --- spec/unit/mutant/matcher/method/each_spec.rb | 46 -------------------- 2 files changed, 52 deletions(-) delete mode 100644 spec/support/sample_subjects.rb delete mode 100644 spec/unit/mutant/matcher/method/each_spec.rb diff --git a/spec/support/sample_subjects.rb b/spec/support/sample_subjects.rb deleted file mode 100644 index c770b157..00000000 --- a/spec/support/sample_subjects.rb +++ /dev/null @@ -1,6 +0,0 @@ -module SampleSubjects - module ExampleModule - def foo; end - def self.bar; end - end -end diff --git a/spec/unit/mutant/matcher/method/each_spec.rb b/spec/unit/mutant/matcher/method/each_spec.rb deleted file mode 100644 index 950a899a..00000000 --- a/spec/unit/mutant/matcher/method/each_spec.rb +++ /dev/null @@ -1,46 +0,0 @@ -require 'spec_helper' - -# This method implementation cannot be called from the outside, but heckle needs to be happy. - -describe Mutant::Matcher::Method, '#each' do - let(:class_under_test) do - node = self.matched_node - Class.new(described_class) do - define_method(:matched_node) do - node - end - - define_method(:method) do - TestApp::Literal.instance_method(:string) - end - - define_method(:constant) do - ::SampleSubjects::ExampleModule - end - end - end - - subject { object.each { |item| yields << item } } - - let(:object) { class_under_test.allocate } - let(:yields) { [] } - - it_should_behave_like 'an #each method' - - let(:matched_node) { mock('Root Node') } - - context 'with match' do - it 'should yield subject' do - expect { subject }.to change { yields.dup }.from([]).to([object.send(:subject)]) - end - end - - context 'without match' do - let(:matched_node) { nil } - - it 'should yield nothing' do - subject - yields.should eql([]) - end - end -end