Created
August 3, 2013 02:34
-
-
Save snusnu/6144875 to your computer and use it in GitHub Desktop.
Possible bug in mutant
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'concord' | |
class Request | |
include Concord.new(:input) | |
end | |
class Response | |
include Concord.new(:input, :output) | |
def to_request(new_input = output) | |
Request.new(new_input) | |
end | |
end | |
require 'rspec' | |
describe Response, '#to_request' do | |
let(:object) { Response.new(input, output) } | |
let(:input) { double('input') } | |
let(:output) { double('output') } | |
let(:expected) { Request.new(new_input) } | |
# How come mutant thinks this spec kills all mutations? | |
context 'when no new input is given' do | |
subject { object.to_request } | |
let(:new_input) { output } | |
it { should eql(expected) } | |
end | |
# I think the following context is also needed | |
# context 'when new input is given' do | |
# subject { object.to_request(new_input) } | |
# let(:new_input) { double('new_input') } | |
# it { should eql(expected) } | |
# end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment