dbd 0.0.11 → 0.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. checksums.yaml +4 -4
  2. data/Guardfile +0 -1
  3. data/HISTORY.txt +9 -0
  4. data/README.md +47 -39
  5. data/bin/test_1.rb +4 -4
  6. data/bin/test_5.rb +4 -4
  7. data/docs/test.rb +11 -11
  8. data/lib/dbd.rb +2 -2
  9. data/lib/dbd/context.rb +65 -0
  10. data/lib/dbd/context_fact.rb +76 -0
  11. data/lib/dbd/errors.rb +1 -1
  12. data/lib/dbd/fact.rb +37 -37
  13. data/lib/dbd/fact/collection.rb +5 -5
  14. data/lib/dbd/fact/factory.rb +6 -6
  15. data/lib/dbd/graph.rb +2 -2
  16. data/lib/dbd/resource.rb +25 -24
  17. data/lib/dbd/version.rb +1 -1
  18. data/spec/lib/dbd/context/context_spec.rb +74 -0
  19. data/spec/lib/dbd/context_fact/methods_spec.rb +79 -0
  20. data/spec/lib/dbd/context_fact/new_spec.rb +51 -0
  21. data/spec/lib/dbd/context_fact/test_factories_spec.rb +24 -0
  22. data/spec/lib/dbd/errors/errors_spec.rb +30 -0
  23. data/spec/lib/dbd/fact/collection/collection_spec.rb +58 -58
  24. data/spec/lib/dbd/fact/factory/factory_spec.rb +3 -3
  25. data/spec/lib/dbd/fact/methods_spec.rb +12 -12
  26. data/spec/lib/dbd/fact/new_spec.rb +9 -9
  27. data/spec/lib/dbd/fact/subject/test_factories_spec.rb +4 -4
  28. data/spec/lib/dbd/fact/test_factories_spec.rb +18 -18
  29. data/spec/lib/dbd/graph/add_to_graph_spec.rb +22 -22
  30. data/spec/lib/dbd/graph/from_csv_spec.rb +16 -16
  31. data/spec/lib/dbd/graph/test_factories_spec.rb +11 -11
  32. data/spec/lib/dbd/graph/to_csv_spec.rb +18 -18
  33. data/spec/lib/dbd/performance_spec.rb +4 -4
  34. data/spec/lib/dbd/resource/collection_spec.rb +28 -30
  35. data/spec/lib/dbd/resource/new_spec.rb +10 -11
  36. data/spec/lib/dbd/resource/test_factories_spec.rb +8 -7
  37. data/spec/lib/dbd/version/version_spec.rb +9 -0
  38. data/spec/test_factories/context.rb +16 -0
  39. data/spec/test_factories/{provenance_fact.rb → context_fact.rb} +6 -6
  40. data/spec/test_factories/fact.rb +23 -23
  41. data/spec/test_factories/fact/subject.rb +1 -1
  42. data/spec/test_factories/graph.rb +7 -7
  43. data/spec/test_factories/resource.rb +15 -10
  44. metadata +20 -16
  45. data/lib/dbd/provenance_fact.rb +0 -77
  46. data/lib/dbd/provenance_resource.rb +0 -63
  47. data/spec/lib/dbd/provenance_fact/methods_spec.rb +0 -78
  48. data/spec/lib/dbd/provenance_fact/new_spec.rb +0 -51
  49. data/spec/lib/dbd/provenance_fact/test_factories_spec.rb +0 -24
  50. data/spec/lib/dbd/provenance_resource/provenance_resource_spec.rb +0 -75
  51. data/spec/test_factories/provenance_resource.rb +0 -16
@@ -16,22 +16,22 @@ module Dbd
16
16
  end
17
17
 
18
18
  describe '#from_CSV reads back a csv exported graph correctly' do
19
- describe 'for a graph with only provenance_facts' do
19
+ describe 'for a graph with only context_facts' do
20
20
 
21
- let(:graph) { TestFactories::Graph.only_provenance }
21
+ let(:graph) { TestFactories::Graph.only_context }
22
22
 
23
23
  it 'round_trip validates' do
24
24
  validate_round_trip(graph)
25
25
  end
26
26
 
27
- it 'for a provenance_fact, the provenance_subject must be equal (nil)' do
27
+ it 'for a context_fact, the context_subject must be equal (nil)' do
28
28
  graph_from_CSV = round_tripped_graph(graph)
29
- provenance_fact = graph_from_CSV.first
30
- provenance_fact.provenance_subject.should be_nil
29
+ context_fact = graph_from_CSV.first
30
+ context_fact.context_subject.should be_nil
31
31
  end
32
32
  end
33
33
 
34
- describe 'for a graph with facts and provenance_facts' do
34
+ describe 'for a graph with facts and context_facts' do
35
35
 
36
36
  let(:graph) { TestFactories::Graph.full }
37
37
 
@@ -47,15 +47,15 @@ module Dbd
47
47
  end
48
48
 
49
49
  describe '#from_CSV reads back _two_ csv exported graphs correctly' do
50
- describe 'for a graph with facts and provenance_facts' do
50
+ describe 'for a graph with facts and context_facts' do
51
51
 
52
- let(:graph_provenance) { TestFactories::Graph.only_provenance }
53
- let(:graph_facts) { TestFactories::Graph.only_facts(graph_provenance.first.subject) }
54
- let(:graph_provenance_csv) { graph_provenance.to_CSV }
52
+ let(:graph_context) { TestFactories::Graph.only_context }
53
+ let(:graph_facts) { TestFactories::Graph.only_facts(graph_context.first.subject) }
54
+ let(:graph_context_csv) { graph_context.to_CSV }
55
55
  let(:graph_facts_csv) { graph_facts.to_CSV }
56
56
 
57
57
  let(:graph_from_2_csv_s) do
58
- stream_1 = StringIO.new(graph_provenance_csv)
58
+ stream_1 = StringIO.new(graph_context_csv)
59
59
  stream_2 = StringIO.new(graph_facts_csv)
60
60
  graph = described_class.new
61
61
  graph.from_CSV(stream_1)
@@ -64,21 +64,21 @@ module Dbd
64
64
 
65
65
  it 'round_trip validates' do
66
66
  # we do not have full graph equivalence yet
67
- graph_from_2_csv_s.first.should be_equivalent(graph_provenance.first)
67
+ graph_from_2_csv_s.first.should be_equivalent(graph_context.first)
68
68
  graph_from_2_csv_s.last.should be_equivalent(graph_facts.last)
69
69
  end
70
70
 
71
71
  it 'a string concat of 2 CSV files works to logically concat them' do
72
- graph_from_2_csv_s.to_CSV.should == (graph_provenance_csv + graph_facts_csv)
72
+ graph_from_2_csv_s.to_CSV.should == (graph_context_csv + graph_facts_csv)
73
73
  end
74
74
  end
75
75
  end
76
76
 
77
77
  describe '#from_CSV reads special cases correctly' do
78
78
 
79
- let(:provenance_subject) { TestFactories::Fact::Subject.fixed_provenance_subject }
80
- let(:resource) { TestFactories::Resource.empty(provenance_subject) }
81
- let(:special_fact) { TestFactories::Fact.fact_with_special_chars(provenance_subject, resource.subject) }
79
+ let(:context_subject) { TestFactories::Fact::Subject.fixed_context_subject }
80
+ let(:resource) { TestFactories::Resource.empty(context_subject) }
81
+ let(:special_fact) { TestFactories::Fact.fact_with_special_chars(context_subject, resource.subject) }
82
82
 
83
83
  it 'as object' do
84
84
  resource << special_fact
@@ -2,42 +2,42 @@ require 'spec_helper'
2
2
 
3
3
  module TestFactories
4
4
  describe Graph do
5
- describe 'with only provenance facts' do
5
+ describe 'with only context_facts' do
6
6
 
7
- let(:only_provenance) { described_class.only_provenance }
7
+ let(:only_context) { described_class.only_context }
8
8
 
9
9
  it 'is a Graph' do
10
- only_provenance.should be_a(described_class.factory_for)
10
+ only_context.should be_a(described_class.factory_for)
11
11
  end
12
12
 
13
13
  it 'has some facts' do
14
- only_provenance.size.should >= 2
14
+ only_context.size.should >= 2
15
15
  end
16
16
  end
17
17
 
18
18
  describe 'with only facts' do
19
19
 
20
20
  let(:subject) { described_class.new_subject }
21
- let(:only_facts_without_provenance_subject) { described_class.only_facts }
22
- let(:only_facts_with_provenance_subject) { described_class.only_facts(subject) }
21
+ let(:only_facts_without_context_subject) { described_class.only_facts }
22
+ let(:only_facts_with_context_subject) { described_class.only_facts(subject) }
23
23
 
24
- describe 'only_facts_without_provenance_subject' do
24
+ describe 'only_facts_without_context_subject' do
25
25
  it 'is a Graph' do
26
- only_facts_without_provenance_subject.should be_a(described_class.factory_for)
26
+ only_facts_without_context_subject.should be_a(described_class.factory_for)
27
27
  end
28
28
 
29
29
  it 'has some facts' do
30
- only_facts_without_provenance_subject.size.should >= 2
30
+ only_facts_without_context_subject.size.should >= 2
31
31
  end
32
32
  end
33
33
 
34
34
  describe 'only_facts_with_subject' do
35
35
  it 'is a Graph' do
36
- only_facts_with_provenance_subject.should be_a(described_class.factory_for)
36
+ only_facts_with_context_subject.should be_a(described_class.factory_for)
37
37
  end
38
38
 
39
39
  it 'has the set subject' do
40
- only_facts_with_provenance_subject.first.provenance_subject.should == subject
40
+ only_facts_with_context_subject.first.context_subject.should == subject
41
41
  end
42
42
  end
43
43
  end
@@ -8,19 +8,19 @@ module Dbd
8
8
  Fact.factory.new_subject
9
9
  end
10
10
 
11
- let(:provenance_facts) { TestFactories::Fact::Collection.provenance_facts(new_subject) }
12
- let(:provenance_fact_1) { provenance_facts.first }
13
- let(:fact_2_3) { TestFactories::Fact::Collection.fact_2_3(provenance_fact_1.subject) }
14
- let(:fact_special_characters) { TestFactories::Fact::fact_with_special_chars(provenance_fact_1.subject, new_subject) }
11
+ let(:context_facts) { TestFactories::Fact::Collection.context_facts(new_subject) }
12
+ let(:context_fact_1) { context_facts.first }
13
+ let(:fact_2_3) { TestFactories::Fact::Collection.fact_2_3(context_fact_1.subject) }
14
+ let(:fact_special_characters) { TestFactories::Fact::fact_with_special_chars(context_fact_1.subject, new_subject) }
15
15
 
16
16
  let(:subject_valid_regexp) { Fact::Subject.valid_regexp }
17
17
  let(:id_valid_regexp) { Fact::ID.valid_regexp }
18
18
  let(:time_stamp_valid_regexp) { TimeStamp.valid_regexp }
19
19
 
20
- describe '#to_CSV with only provenance_facts' do
20
+ describe '#to_CSV with only context_facts' do
21
21
  before do
22
- provenance_facts.each_with_index do |provenance_fact, index|
23
- subject << provenance_fact
22
+ context_facts.each do |context_fact|
23
+ subject << context_fact
24
24
  end
25
25
  end
26
26
 
@@ -36,7 +36,7 @@ module Dbd
36
36
  subject.to_CSV.should match(/\A"[^",]+","[^",]+","[^",]*","[^",]+"/)
37
37
  end
38
38
 
39
- describe 'with a single provenance_fact collection' do
39
+ describe 'with a single context_fact collection' do
40
40
  it 'has three logical lines (but one with embedded newline)' do
41
41
  subject.to_CSV.lines.count.should == 4
42
42
  end
@@ -46,7 +46,7 @@ module Dbd
46
46
  end
47
47
  end
48
48
 
49
- describe 'has all attributes of the provenance_fact_collection' do
49
+ describe 'has all attributes of the context_collection' do
50
50
 
51
51
  let(:first_line) do
52
52
  subject.to_CSV.lines.to_a.first.chomp
@@ -60,7 +60,7 @@ module Dbd
60
60
  first_line.split(',')[1][1..-2].should match(time_stamp_valid_regexp)
61
61
  end
62
62
 
63
- it 'has an empty third value (signature of a provenance_fact)' do
63
+ it 'has an empty third value (signature of a context_fact)' do
64
64
  first_line.split(',')[2].should == '""'
65
65
  end
66
66
 
@@ -69,7 +69,7 @@ module Dbd
69
69
  end
70
70
 
71
71
  it 'has data_predicate as 5th value' do
72
- first_line.split(',')[4].should == '"https://data.vandenabeele.com/ontologies/provenance#context"'
72
+ first_line.split(',')[4].should == '"context:visibility"'
73
73
  end
74
74
 
75
75
  it 'has object as 6th value' do
@@ -127,8 +127,8 @@ module Dbd
127
127
  first_line.split(',')[1][1..-2].should match(time_stamp_valid_regexp)
128
128
  end
129
129
 
130
- it 'has provenance_fact_1.subject as third value' do
131
- first_line.split(',')[2].should == "\"#{provenance_fact_1.subject.to_s}\""
130
+ it 'has context_fact_1.subject as third value' do
131
+ first_line.split(',')[2].should == "\"#{context_fact_1.subject.to_s}\""
132
132
  end
133
133
 
134
134
  it 'has subject as 4th value' do
@@ -145,11 +145,11 @@ module Dbd
145
145
  end
146
146
  end
147
147
 
148
- describe '#to_CSV with provenance_facts and facts' do
148
+ describe '#to_CSV with context_facts and facts' do
149
149
 
150
150
  before do
151
- provenance_facts.each do |provenance_fact|
152
- subject << provenance_fact
151
+ context_facts.each do |context_fact|
152
+ subject << context_fact
153
153
  end
154
154
  fact_2_3.each do |fact|
155
155
  subject << fact
@@ -164,8 +164,8 @@ module Dbd
164
164
  describe '#to_CSV_file' do
165
165
 
166
166
  before do
167
- provenance_facts.each do |provenance_fact|
168
- subject << provenance_fact
167
+ context_facts.each do |context_fact|
168
+ subject << context_fact
169
169
  end
170
170
  fact_2_3.each do |fact|
171
171
  subject << fact
@@ -11,23 +11,23 @@ module Dbd
11
11
  Fact.factory.new_subject
12
12
  end
13
13
 
14
- let(:provenance_fact_1) { TestFactories::ProvenanceFact.context(new_subject) }
14
+ let(:context_fact_1) { TestFactories::ContextFact.visibility(new_subject) }
15
15
 
16
16
  NUMBER_OF_FACTS = 10_000
17
17
 
18
18
  describe "#{NUMBER_OF_FACTS} facts" do
19
19
  it 'reports and checks the used time' do
20
20
  graph = Graph.new
21
- graph << provenance_fact_1
21
+ graph << context_fact_1
22
22
  # Rehearsal
23
23
  NUMBER_OF_FACTS.times do |counter|
24
- data_fact = TestFactories::Fact.data_fact(provenance_fact_1, new_subject)
24
+ data_fact = TestFactories::Fact.data_fact(context_fact_1, new_subject)
25
25
  graph << data_fact
26
26
  end
27
27
  # Actual
28
28
  start = Time.now
29
29
  NUMBER_OF_FACTS.times do |counter|
30
- data_fact = TestFactories::Fact.data_fact(provenance_fact_1, new_subject)
30
+ data_fact = TestFactories::Fact.data_fact(context_fact_1, new_subject)
31
31
  graph << data_fact
32
32
  end
33
33
  duration = Time.now - start
@@ -3,10 +3,8 @@ require 'spec_helper'
3
3
  module Dbd
4
4
  describe Resource do
5
5
 
6
- let(:provenance_subject) { TestFactories::ProvenanceResource.provenance_resource.subject }
7
-
8
- let(:resource) { described_class.new(provenance_subject: provenance_subject) }
9
-
6
+ let(:context_subject) { TestFactories::ContextFact.new_subject }
7
+ let(:resource) { described_class.new(context_subject: context_subject) }
10
8
  let(:resource_subject) { resource.subject }
11
9
 
12
10
  describe 'the fact collection' do
@@ -14,11 +12,11 @@ module Dbd
14
12
  let(:fact_2_with_subject) { TestFactories::Fact.fact_2_with_subject }
15
13
  let(:fact_3_with_subject) { TestFactories::Fact.fact_3_with_subject }
16
14
  let(:fact_without_subject) { TestFactories::Fact.data_fact }
17
- let(:fact_with_provenance) { TestFactories::Fact.data_fact(provenance_subject, nil) }
15
+ let(:fact_with_context) { TestFactories::Fact.data_fact(context_subject, nil) }
18
16
  let(:fact_with_resource_subject) { TestFactories::Fact.data_fact(nil, resource_subject) }
19
- let(:fact_with_provenance_and_resource_subject) { TestFactories::Fact.data_fact(provenance_subject, resource_subject) }
20
- let(:fact_with_incorrect_provenance) { TestFactories::Fact.data_fact(TestFactories::ProvenanceFact.new_subject, resource_subject) }
21
- let(:provenance_fact_context) { TestFactories::ProvenanceFact.context }
17
+ let(:fact_with_context_and_resource_subject) { TestFactories::Fact.data_fact(context_subject, resource_subject) }
18
+ let(:fact_with_incorrect_context) { TestFactories::Fact.data_fact(TestFactories::ContextFact.new_subject, resource_subject) }
19
+ let(:context_fact_visibility) { TestFactories::ContextFact.visibility }
22
20
 
23
21
  it 'enumerable functions work' do
24
22
  resource.to_a.should == []
@@ -28,22 +26,22 @@ module Dbd
28
26
 
29
27
  it 'can add a two facts (no subject set)' do
30
28
  resource << fact_without_subject
31
- resource << fact_with_provenance
29
+ resource << fact_with_context
32
30
  resource.size.should == 2
33
31
  end
34
32
 
35
- it 'complains if a provenance_subject is added' do
36
- lambda{ resource << provenance_fact_context }.should raise_error(
33
+ it 'complains if a context_subject is added' do
34
+ lambda{ resource << context_fact_visibility }.should raise_error(
37
35
  ArgumentError,
38
- 'Trying to add a ProvenanceFact to a Resource.')
36
+ 'Trying to add a ContextFact to a Resource.')
39
37
  end
40
38
 
41
39
  describe 'checks and sets subject :' do
42
40
  describe 'adding a fact with subject :' do
43
41
  describe 'when the subject of the fact is equal to the resource_subject' do
44
42
  it 'inserts the fact unaltered' do
45
- resource << fact_with_provenance_and_resource_subject
46
- resource.first.should be_equal(fact_with_provenance_and_resource_subject)
43
+ resource << fact_with_context_and_resource_subject
44
+ resource.first.should be_equal(fact_with_context_and_resource_subject)
47
45
  end
48
46
  end
49
47
 
@@ -60,7 +58,7 @@ module Dbd
60
58
  describe 'adding a fact without subject' do
61
59
 
62
60
  before(:each) do
63
- resource << fact_with_provenance
61
+ resource << fact_with_context
64
62
  end
65
63
 
66
64
  let(:fact_in_resource) do
@@ -68,12 +66,12 @@ module Dbd
68
66
  end
69
67
 
70
68
  it 'insert the same instance' do
71
- fact_in_resource.should be_equal(fact_with_provenance)
69
+ fact_in_resource.should be_equal(fact_with_context)
72
70
  end
73
71
 
74
72
  it 'has kept the other attributes' do
75
- (fact_with_provenance.class.attributes - [:subject]).each do |attr|
76
- fact_in_resource.send(attr).should == fact_with_provenance.send(attr)
73
+ (fact_with_context.class.attributes - [:subject]).each do |attr|
74
+ fact_in_resource.send(attr).should == fact_with_context.send(attr)
77
75
  end
78
76
  end
79
77
 
@@ -83,26 +81,26 @@ module Dbd
83
81
  end
84
82
  end
85
83
 
86
- describe 'checks and sets provenance_subject :' do
87
- describe 'adding a fact with a provenance subject :' do
88
- describe 'when the provenance_subject of the fact is equal to the provenance_subject of the resource' do
84
+ describe 'checks and sets context_subject :' do
85
+ describe 'adding a fact with a context_fact subject :' do
86
+ describe 'when the context_subject of the fact is equal to the context_subject of the resource' do
89
87
  it 'inserts the fact unaltered' do
90
- resource << fact_with_provenance_and_resource_subject
91
- resource.single.should be_equal(fact_with_provenance_and_resource_subject)
88
+ resource << fact_with_context_and_resource_subject
89
+ resource.single.should be_equal(fact_with_context_and_resource_subject)
92
90
  end
93
91
  end
94
92
 
95
- describe 'when the provenance_subject of the fact is not equal to the resource' do
93
+ describe 'when the context_subject of the fact is not equal to the resource' do
96
94
  it 'raises a SetOnceError' do
97
- lambda{ resource << fact_with_incorrect_provenance }.should raise_error(
95
+ lambda{ resource << fact_with_incorrect_context }.should raise_error(
98
96
  RubyPeterV::SetOnceError,
99
- "Value of provenance_subject was #{fact_with_incorrect_provenance.provenance_subject}, " \
100
- "trying to set it to #{resource.provenance_subject}")
97
+ "Value of context_subject was #{fact_with_incorrect_context.context_subject}, " \
98
+ "trying to set it to #{resource.context_subject}")
101
99
  end
102
100
  end
103
101
  end
104
102
 
105
- describe 'adding a fact without provenance_subject' do
103
+ describe 'adding a fact without context_subject' do
106
104
 
107
105
  before(:each) do
108
106
  resource << fact_with_resource_subject
@@ -114,8 +112,8 @@ module Dbd
114
112
  fact_in_resource.should be_equal(fact_with_resource_subject)
115
113
  end
116
114
 
117
- it 'has set the provenance_subject to the Resource provenance_subject' do
118
- fact_in_resource.provenance_subject.should == provenance_subject
115
+ it 'has set the context_subject to the Resource context_subject' do
116
+ fact_in_resource.context_subject.should == context_subject
119
117
  end
120
118
  end
121
119
  end
@@ -3,9 +3,8 @@ require 'spec_helper'
3
3
  module Dbd
4
4
  describe Resource do
5
5
 
6
- let(:provenance_subject) { TestFactories::ProvenanceResource.provenance_resource.subject }
7
-
8
- let(:resource) { described_class.new(provenance_subject: provenance_subject) }
6
+ let(:context_subject) { TestFactories::ContextFact.new_subject }
7
+ let(:resource) { described_class.new(context_subject: context_subject) }
9
8
 
10
9
  describe '.new_subject' do
11
10
  it 'returns a Fact#new_subject' do
@@ -14,13 +13,13 @@ module Dbd
14
13
  end
15
14
 
16
15
  describe '.new' do
17
- describe 'with a provenance_subject argument' do
16
+ describe 'with a context_subject argument' do
18
17
  it 'has created a subject' do
19
18
  resource.subject.should be_a(described_class.new_subject.class)
20
19
  end
21
20
 
22
- it 'has stored the provenance_subject' do
23
- resource.provenance_subject.should == provenance_subject
21
+ it 'has stored the context_subject' do
22
+ resource.context_subject.should == context_subject
24
23
  end
25
24
  end
26
25
 
@@ -29,14 +28,14 @@ module Dbd
29
28
  explicit_subject = described_class.new_subject
30
29
  described_class.new(
31
30
  subject: explicit_subject,
32
- provenance_subject: provenance_subject).subject.should == explicit_subject
31
+ context_subject: context_subject).subject.should == explicit_subject
33
32
  end
34
33
  end
35
34
 
36
- describe 'with a nil provenance_subject argument' do
37
- it 'raises a ProvenanceError' do
38
- lambda { described_class.new(provenance_subject: nil) } .
39
- should raise_error ProvenanceError
35
+ describe 'with a nil context_subject argument' do
36
+ it 'raises a ContextError' do
37
+ lambda { described_class.new(context_subject: nil) } .
38
+ should raise_error ContextError
40
39
  end
41
40
  end
42
41
  end
@@ -3,21 +3,22 @@ require 'spec_helper'
3
3
  module TestFactories
4
4
  describe Resource do
5
5
 
6
- let(:provenance_subject) { TestFactories::ProvenanceResource.provenance_resource.subject }
6
+ let(:context_subject) { TestFactories::ContextFact.new_subject }
7
7
 
8
8
  describe "TestFactories::Resource" do
9
9
  it ".empty works" do
10
- described_class.facts_resource(provenance_subject)
10
+ resource = described_class.empty(context_subject)
11
+ resource.context_subject.should == context_subject
11
12
  end
12
13
 
13
- context ".facts_resource" do
14
- it "works with explicit provenance_subject" do
15
- described_class.facts_resource(provenance_subject)
14
+ describe ".facts_resource" do
15
+ it "works with explicit context_subject" do
16
+ described_class.facts_resource(context_subject)
16
17
  end
17
18
 
18
- it "works without explicit provenance_subject" do
19
+ it "works without explicit context_subject" do
19
20
  resource = described_class.facts_resource()
20
- resource.provenance_subject.should_not be_nil
21
+ resource.context_subject.should_not be_nil
21
22
  end
22
23
  end
23
24
  end