fetcher-microdata 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -6,7 +6,7 @@ module Fetcher
6
6
  if args.length == 2
7
7
  super *args
8
8
  else
9
- raise ArgumentError, "Wrong number of arguments #{args.length} and 3 needed"
9
+ raise ArgumentError, "Wrong number of arguments #{args.length} and 2 needed"
10
10
  end
11
11
  @_type = "http://schema.org/Article/Small"
12
12
  end
@@ -6,7 +6,7 @@ module Fetcher
6
6
  if args.length == 1
7
7
  super *args
8
8
  else
9
- raise ArgumentError, "Wrong number of arguments #{args.length} and 3 needed"
9
+ raise ArgumentError, "Wrong number of arguments #{args.length} and 1 needed"
10
10
  end
11
11
  @_type = 'http://schema.org/Person/User'
12
12
  end
@@ -6,7 +6,7 @@ module Fetcher
6
6
  if args.length == 2
7
7
  super *args
8
8
  else
9
- raise ArgumentError, "Wrong number of arguments #{args.length} and 3 needed"
9
+ raise ArgumentError, "Wrong number of arguments #{args.length} and 2 needed"
10
10
  end
11
11
  @_type = "http://schema.org/Review"
12
12
  end
@@ -1,5 +1,5 @@
1
1
  module Fetcher
2
2
  class Microdata
3
- VERSION = "0.0.3"
3
+ VERSION = "0.0.4"
4
4
  end
5
5
  end
@@ -8,6 +8,12 @@ describe Fetcher::Microdata::ArticleSmall do
8
8
  end
9
9
  end
10
10
 
11
+ it 'should raise wrong number of argument if the count of arguments is distinct of 2' do
12
+ expect {
13
+ Fetcher::Microdata::ArticleSmall.new "a", "b", "c"
14
+ }.to raise_error
15
+ end
16
+
11
17
  it 'should inherit from Fetcher::Microdata' do
12
18
  Fetcher::Microdata::ArticleSmall.superclass.should == Fetcher::Microdata
13
19
  end
@@ -12,6 +12,12 @@ describe Fetcher::Microdata::PersonUser do
12
12
  Fetcher::Microdata::PersonUser.superclass.should == Fetcher::Microdata
13
13
  end
14
14
 
15
+ it 'should raise wrong number of argument if the count of arguments is distinct of 1' do
16
+ expect {
17
+ Fetcher::Microdata::PersonUser.new "a", "b", "c"
18
+ }.to raise_error
19
+ end
20
+
15
21
  describe 'attributes' do
16
22
  before do
17
23
  @argument_stub = {}
@@ -12,6 +12,12 @@ describe Fetcher::Microdata::Review do
12
12
  Fetcher::Microdata::Review.superclass.should == Fetcher::Microdata
13
13
  end
14
14
 
15
+ it 'should raise wrong number of argument if the count of arguments is distinct of 2' do
16
+ expect {
17
+ Fetcher::Microdata::Review.new "a", "b", "c"
18
+ }.to raise_error
19
+ end
20
+
15
21
  describe 'attributes' do
16
22
  before do
17
23
  Fetcher::Microdata::Review.any_instance.stub :coerce
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fetcher-microdata
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-11-22 00:00:00.000000000 Z
12
+ date: 2012-11-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: discoverer