spec/csl/style/number_spec.rb in csl-1.2.1 vs spec/csl/style/number_spec.rb in csl-1.2.2

- old
+ new

@@ -3,82 +3,82 @@ module CSL describe Style::Number do describe '.new' do it 'returns an empty number tag by default' do - Style::Number.new.should_not have_attributes + expect(Style::Number.new).not_to have_attributes end it 'accepts a form attribute' do - Style::Number.new(:form => 'roman').should be_roman + expect(Style::Number.new(:form => 'roman')).to be_roman end end describe '#numeric?' do it 'returns true by default' do - Style::Number.new.should be_numeric + expect(Style::Number.new).to be_numeric end it 'returns false if the form attribute is set to a value other than :numeric' do - Style::Number.new(:form => 'foo').should_not be_numeric + expect(Style::Number.new(:form => 'foo')).not_to be_numeric end it 'returns false if the form attribute is set to :numeric' do - Style::Number.new(:form => 'numeric').should be_numeric + expect(Style::Number.new(:form => 'numeric')).to be_numeric end end describe '#roman?' do it 'returns false by default' do - Style::Number.new.should_not be_roman + expect(Style::Number.new).not_to be_roman end it 'returns false if the form attribute is set to a value other than :numeric' do - Style::Number.new(:form => 'ordinal').should_not be_roman + expect(Style::Number.new(:form => 'ordinal')).not_to be_roman end it 'returns false if the form attribute is set to :roman' do - Style::Number.new(:form => 'roman').should be_roman + expect(Style::Number.new(:form => 'roman')).to be_roman end end describe '#ordinal?' do it 'returns false by default' do - Style::Number.new.should_not be_ordinal + expect(Style::Number.new).not_to be_ordinal end it 'returns false if the form attribute is set to a value other than :ordinal' do - Style::Number.new(:form => 'long-ordinal').should_not be_ordinal + expect(Style::Number.new(:form => 'long-ordinal')).not_to be_ordinal end it 'returns false if the form attribute is set to :ordinal' do - Style::Number.new(:form => 'ordinal').should be_ordinal - Style::Number.new(:form => :ordinal).should be_ordinal + expect(Style::Number.new(:form => 'ordinal')).to be_ordinal + expect(Style::Number.new(:form => :ordinal)).to be_ordinal end end describe '#long_ordinal?' do it 'returns false by default' do - Style::Number.new.should_not be_long_ordinal + expect(Style::Number.new).not_to be_long_ordinal end it 'returns false if the form attribute is set to a value other than :"long-ordinal"' do - Style::Number.new(:form => 'ordinal').should_not be_long_ordinal + expect(Style::Number.new(:form => 'ordinal')).not_to be_long_ordinal end it 'returns false if the form attribute is set to :ordinal' do - Style::Number.new(:form => 'long-ordinal').should be_long_ordinal + expect(Style::Number.new(:form => 'long-ordinal')).to be_long_ordinal end end describe '#to_xml' do it 'returns an empty number tag by default' do - Style::Number.new.to_xml.should == '<number/>' + expect(Style::Number.new.to_xml).to eq('<number/>') end it 'returns a tag with a all attribute assignments' do - Style::Number.new(:form => 'roman').to_xml.should == '<number form="roman"/>' + expect(Style::Number.new(:form => 'roman').to_xml).to eq('<number form="roman"/>') end end end end \ No newline at end of file