Created
November 7, 2012 17:51
-
-
Save mbj/4033212 to your computer and use it in GitHub Desktop.
incomplete specs that trigger uncovered mutations
This file contains 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 'spec_helper' | |
describe AliasSet, '#initialize' do | |
let(:prefix) { :songs } | |
let(:attributes) { Mapper::AttributeSet.new << attribute } | |
let(:attribute) { Mapper::Attribute.build(:id, :type => Integer) } | |
let(:excluded) { [ :id ] } | |
context 'with prefix passed to #initialize' do | |
subject { described_class.new(prefix) } | |
# its(:prefix) { should == prefix } | |
# its(:attributes) { should == Mapper::AttributeSet.new } | |
its(:excluded) { should == [] } | |
its(:to_hash) { should == {} } | |
end | |
context 'with prefix and attributes passed to #initialize' do | |
subject { described_class.new(prefix, attributes) } | |
# its(:prefix) { should == prefix } | |
# its(:attributes) { should == attributes } | |
its(:excluded) { should == [] } | |
its(:to_hash) { should == { :id => :songs_id } } | |
end | |
context 'with prefix, attributes and excluded passed to #initialize' do | |
subject { described_class.new(prefix, attributes, excluded) } | |
# its(:prefix) { should == prefix } | |
# its(:attributes) { should == attributes } | |
its(:excluded) { should == excluded } | |
its(:to_hash) { should == {} } | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment