spec/fetcher/microdata/review_spec.rb in fetcher-microdata-0.0.7 vs spec/fetcher/microdata/review_spec.rb in fetcher-microdata-0.0.8
- old
+ new
@@ -1,11 +1,12 @@
require 'spec_helper'
describe Fetcher::Microdata::Review do
describe '.new' do
it 'should set the _type to schema.org/Review' do
- article = Fetcher::Microdata::Review.new @argument, @viewer
+ @arg = stub "arg"
+ article = Fetcher::Microdata::Review.new @arg, @argument, @viewer
article._type.should == "http://schema.org/Review"
end
end
it 'should inherit from Fetcher::Microdata' do
@@ -18,54 +19,57 @@
}.to raise_error
end
describe 'attributes' do
before do
+ @arg1 = stub "args1"
+ @arg2 = stub "args2"
+ @arg3 = stub "args3"
Fetcher::Microdata::Review.any_instance.stub :coerce
end
it 'should set attribute additionalType' do
- Fetcher::Microdata::Review.new(@argument_stub, @viewer_stub)
+ Fetcher::Microdata::Review.new(@arg1, @arg2, @arg3)
.attributes.should have_key :additionalType
end
it 'should set attribute id' do
- Fetcher::Microdata::Review.new(@argument_stub, @viewer_stub)
+ Fetcher::Microdata::Review.new(@arg1, @arg2, @arg3)
.attributes.should have_key :id
end
it 'should set attribute articleBody' do
- Fetcher::Microdata::Review.new(@argument_stub, @viewer_stub)
- .attributes.should have_key :articleBody
+ Fetcher::Microdata::Review.new(@arg1, @arg2, @arg3)
+ .attributes.should have_key :reviewBody
end
it 'should set attribute author' do
- Fetcher::Microdata::Review.new(@argument_stub, @viewer_stub)
+ Fetcher::Microdata::Review.new(@arg1, @arg2, @arg3)
.attributes.should have_key :author
end
it 'should set attribute viewer' do
- Fetcher::Microdata::Review.new(@argument_stub, @viewer_stub)
+ Fetcher::Microdata::Review.new(@arg1, @arg2, @arg3)
.attributes.should have_key :viewer
end
it 'should set attribute dateCreated' do
- Fetcher::Microdata::Review.new(@argument_stub, @viewer_stub)
+ Fetcher::Microdata::Review.new(@arg1, @arg2, @arg3)
.attributes.should have_key :dateCreated
end
it 'should set attribute provider' do
- Fetcher::Microdata::Review.new(@argument_stub, @viewer_stub)
+ Fetcher::Microdata::Review.new(@arg1, @arg2, @arg3)
.attributes.should have_key :provider
end
it 'should set attribute url' do
- Fetcher::Microdata::Review.new(@argument_stub, @viewer_stub)
+ Fetcher::Microdata::Review.new(@arg1, @arg2, @arg3)
.attributes.should have_key :url
end
it 'should set attribute original_tweet' do
- Fetcher::Microdata::Review.new(@argument_stub, @viewer_stub)
- .attributes.should have_key :original_tweet
+ Fetcher::Microdata::Review.new(@arg1, @arg2, @arg3)
+ .attributes.should have_key :itemReviewed
end
end
end
\ No newline at end of file