spec/fetcher/microdata/person_user_spec.rb in fetcher-microdata-0.0.7 vs spec/fetcher/microdata/person_user_spec.rb in fetcher-microdata-0.0.8

- old
+ new

@@ -1,11 +1,12 @@ require 'spec_helper' describe Fetcher::Microdata::PersonUser do describe '.new' do - it 'should set the _type to schema.org/Person/User' do - person = Fetcher::Microdata::PersonUser.new @argument + it 'should set the _type to schema.org/Person/User' do + @arg = stub "arg" + person = Fetcher::Microdata::PersonUser.new @arg, @argument person._type.should == "http://schema.org/Person/User" end end it 'should inherit from Fetcher::Microdata' do @@ -18,33 +19,34 @@ }.to raise_error end describe 'attributes' do before do - @argument_stub = {} + @arg1 = stub "arg1" + @arg2 = stub "arg2" end it 'should have the attribute additionalType' do - Fetcher::Microdata::PersonUser.new(@argument_stub).attributes.should have_key :additionalType + Fetcher::Microdata::PersonUser.new(@arg1, @arg2).attributes.should have_key :additionalType end it 'should have the attribute id' do - Fetcher::Microdata::PersonUser.new(@argument_stub).attributes.should have_key :id + Fetcher::Microdata::PersonUser.new(@arg1, @arg2).attributes.should have_key :id end it 'should have the attribute name' do - Fetcher::Microdata::PersonUser.new(@argument_stub).attributes.should have_key :name + Fetcher::Microdata::PersonUser.new(@arg1, @arg2).attributes.should have_key :name end it 'should have the attribute dateRegistered' do - Fetcher::Microdata::PersonUser.new(@argument_stub).attributes.should have_key :dateRegistered + Fetcher::Microdata::PersonUser.new(@arg1, @arg2).attributes.should have_key :dateRegistered end it 'should have the attribute description' do - Fetcher::Microdata::PersonUser.new(@argument_stub).attributes.should have_key :description + Fetcher::Microdata::PersonUser.new(@arg1, @arg2).attributes.should have_key :description end it 'should have the attribute url' do - Fetcher::Microdata::PersonUser.new(@argument_stub).attributes.should have_key :url + Fetcher::Microdata::PersonUser.new(@arg1, @arg2).attributes.should have_key :url end end end \ No newline at end of file