Remove sample subjects

This commit is contained in:
Markus Schirp 2012-08-16 22:49:47 +02:00
parent 21aa13b9bd
commit d6165b3525
2 changed files with 0 additions and 52 deletions

View file

@ -1,6 +0,0 @@
module SampleSubjects
module ExampleModule
def foo; end
def self.bar; end
end
end

View file

@ -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