spec/functional/xommelier/atom/feed/building_hash_spec.rb in xommelier-0.1.31 vs spec/functional/xommelier/atom/feed/building_hash_spec.rb in xommelier-0.1.32

- old
+ new

@@ -5,11 +5,11 @@ # Author: Alexander Semyonov <al@semyonov.us> # ################################################ require 'spec_helper' -describe Xommelier::Atom::Feed do +RSpec.describe Xommelier::Atom::Feed do describe '.new(Hash)' do let(:hash) do { title: 'Xommelier nest elements', subtitle: 'Xommelier is able to build complex objects from very nested hash', @@ -27,16 +27,16 @@ } end subject(:doc) { Xommelier::Atom::Feed.new(hash) } - it { should have(1).authors } - it { should have(2).contributors } - it { should have(3).entries } + its('authors.size') { should == 1 } + its('contributors.size') { should == 2 } + its('entries.size') { should == 3 } - it { doc.author.should be_an(Xommelier::Atom::Person) } - it { doc.contributors[1].should be_an(Xommelier::Atom::Person) } - it { doc.entries[1].should be_an(Xommelier::Atom::Entry) } + it { expect(doc.author).to be_an(Xommelier::Atom::Person) } + it { expect(doc.contributors[1]).to be_an(Xommelier::Atom::Person) } + it { expect(doc.entries[1]).to be_an(Xommelier::Atom::Entry) } its(:to_hash) { should == hash} its(:to_xml) { should == load_xml_file('nested_atom') } it_behaves_like 'Valid XML Document' end