spec/results_container_spec.rb in popularity-0.1.1 vs spec/results_container_spec.rb in popularity-0.2.1
- old
+ new
@@ -22,18 +22,18 @@
subject {
Popularity::ResultsContainer.new
}
- it "should reject differnt types" do
+ it "should reject different types" do
subject.add_result Popularity::Facebook.new("http://google.com")
expect(1).to equal(subject.results.size)
- expect{
+ expect{
subject.add_result(Popularity::Twitter.new("http://google.com"))
} .to raise_error(TypeError)
-
+
end
end
context "adding results" do
use_vcr_cassette "result-container-test"
@@ -46,10 +46,10 @@
subject.add_result Popularity::Facebook.new("http://google.com")
subject.add_result Popularity::Facebook.new("http://yahoo.com")
expect(subject.results.collect(&:shares).reduce(:+)).to eq(subject.shares)
end
-
+
it "should add methods together" do
subject.add_result Popularity::Facebook.new("http://google.com")
subject.add_result Popularity::Facebook.new("http://yahoo.com")
expect(subject.results.collect(&:shares).reduce(:+)).to eq(subject.shares)