spec/alphabet_spec.rb in bioinform-0.2.2 vs spec/alphabet_spec.rb in bioinform-0.3.0
- old
+ new
@@ -1,12 +1,12 @@
require 'bioinform/alphabet'
describe Bioinform::ComplementableAlphabet do
specify "should raise if complement's complement is not original letter" do
- expect{ Bioinform::ComplementableAlphabet.new([:A,:B,:X,:Y], [:X,:Y,:B,:A]) }.to raise_error Bioinform::Error
- expect{ Bioinform::ComplementableAlphabet.new([:A,:B,:B,:C], [:C,:B,:B,:A]) }.to raise_error Bioinform::Error
- expect{ Bioinform::ComplementableAlphabet.new([:A,:B,:X,:Y], [:X,:Y,:B,:A,:C]) }.to raise_error Bioinform::Error
+ expect{ Bioinform::ComplementableAlphabet.new([:A,:B,:X,:Y], [:X,:Y,:B,:A]) }.to raise_error(Bioinform::Error)
+ expect{ Bioinform::ComplementableAlphabet.new([:A,:B,:B,:C], [:C,:B,:B,:A]) }.to raise_error(Bioinform::Error)
+ expect{ Bioinform::ComplementableAlphabet.new([:A,:B,:X,:Y], [:X,:Y,:B,:A,:C]) }.to raise_error(Bioinform::Error)
end
context 'usage with alphabet non-symbolized, non-upcased' do
let(:alphabet) { Bioinform::ComplementableAlphabet.new([:a,:B,'x','Y'], ['X',:y,:A,'B']) }
@@ -46,13 +46,13 @@
describe Bioinform::NucleotideAlphabet do
specify { expect( Bioinform::NucleotideAlphabet.size ).to eq 4 }
specify { expect( Bioinform::NucleotideAlphabet.complement_letter(:A) ).to eq :T }
specify { expect( Bioinform::NucleotideAlphabet.complement_letter(:C) ).to eq :G }
- specify { expect{ Bioinform::NucleotideAlphabet.complement_letter(:N) }.to raise_error Bioinform::Error }
+ specify { expect{ Bioinform::NucleotideAlphabet.complement_letter(:N) }.to raise_error(Bioinform::Error) }
specify { expect(Bioinform::NucleotideAlphabet.complement_index(0)).to eq 3 }
- specify { expect{Bioinform::NucleotideAlphabet.complement_index(4)}.to raise_error Bioinform::Error}
+ specify { expect{Bioinform::NucleotideAlphabet.complement_index(4)}.to raise_error(Bioinform::Error)}
end
describe Bioinform::NucleotideAlphabetWithN do
specify { expect( Bioinform::NucleotideAlphabetWithN.size ).to eq 5 }
specify { expect( Bioinform::NucleotideAlphabetWithN.complement_letter(:A) ).to eq :T }