@@ -8,127 +8,127 @@ module RDF; module Spec
88 module Matchers
99 RSpec ::Matchers . define :be_countable do
1010 match do |countable |
11- countable . should be_a_kind_of ( RDF ::Countable )
11+ expect ( countable ) . to be_a_kind_of ( RDF ::Countable )
1212 true
1313 end
1414 end
1515
1616 RSpec ::Matchers . define :be_enumerable do
1717 match do |enumerable |
18- enumerable . should be_a_kind_of ( RDF ::Enumerable )
18+ expect ( enumerable ) . to be_a_kind_of ( RDF ::Enumerable )
1919 true
2020 end
2121 end
2222
2323 RSpec ::Matchers . define :be_an_enumerator do
2424 match do |enumerator |
25- enumerator . should be_a_kind_of ( RDF ::Enumerator )
25+ expect ( enumerator ) . to be_a_kind_of ( RDF ::Enumerator )
2626 true
2727 end
2828 end
2929
3030 RSpec ::Matchers . define :be_queryable do
3131 match do |enumerable |
32- enumerable . should be_a_kind_of ( RDF ::Queryable )
32+ expect ( enumerable ) . to be_a_kind_of ( RDF ::Queryable )
3333 true
3434 end
3535 end
3636
3737 RSpec ::Matchers . define :be_mutable do
3838 match do |enumerable |
39- enumerable . should be_a_kind_of ( RDF ::Mutable )
39+ expect ( enumerable ) . to be_a_kind_of ( RDF ::Mutable )
4040 true
4141 end
4242 end
4343
4444 RSpec ::Matchers . define :be_a_statement do
4545 match do |statement |
46- statement . should be_instance_of ( RDF ::Statement )
47- statement . subject . should be_a_kind_of ( RDF ::Resource )
48- statement . predicate . should be_a_kind_of ( RDF ::URI )
49- statement . object . should be_a_kind_of ( RDF ::Value )
46+ expect ( statement ) . to be_instance_of ( RDF ::Statement )
47+ expect ( statement . subject ) . to be_a_kind_of ( RDF ::Resource )
48+ expect ( statement . predicate ) . to be_a_kind_of ( RDF ::URI )
49+ expect ( statement . object ) . to be_a_kind_of ( RDF ::Value )
5050 true
5151 end
5252 end
5353
5454 RSpec ::Matchers . define :be_a_triple do
5555 match do |triple |
56- triple . should be_instance_of ( Array )
57- triple . size . should == 3
58- triple [ 0 ] . should be_a_kind_of ( RDF ::Resource )
59- triple [ 1 ] . should be_a_kind_of ( RDF ::URI )
60- triple [ 2 ] . should be_a_kind_of ( RDF ::Value )
56+ expect ( triple ) . to be_instance_of ( Array )
57+ expect ( triple . size ) . to eq 3
58+ expect ( triple [ 0 ] ) . to be_a_kind_of ( RDF ::Resource )
59+ expect ( triple [ 1 ] ) . to be_a_kind_of ( RDF ::URI )
60+ expect ( triple [ 2 ] ) . to be_a_kind_of ( RDF ::Value )
6161 true
6262 end
6363 end
6464
6565 RSpec ::Matchers . define :be_a_quad do
6666 match do |quad |
67- quad . should be_instance_of ( Array )
68- quad . size . should == 4
69- quad [ 0 ] . should be_a_kind_of ( RDF ::Resource )
70- quad [ 1 ] . should be_a_kind_of ( RDF ::URI )
71- quad [ 2 ] . should be_a_kind_of ( RDF ::Value )
72- quad [ 3 ] . should be_a_kind_of ( RDF ::Resource ) unless quad [ 3 ] . nil?
67+ expect ( quad ) . to be_instance_of ( Array )
68+ expect ( quad . size ) . to eq 4
69+ expect ( quad [ 0 ] ) . to be_a_kind_of ( RDF ::Resource )
70+ expect ( quad [ 1 ] ) . to be_a_kind_of ( RDF ::URI )
71+ expect ( quad [ 2 ] ) . to be_a_kind_of ( RDF ::Value )
72+ expect ( quad [ 3 ] ) . to be_a_kind_of ( RDF ::Resource ) unless quad [ 3 ] . nil?
7373 true
7474 end
7575 end
7676
7777 RSpec ::Matchers . define :be_a_resource do
7878 match do |value |
79- value . should be_a_kind_of ( RDF ::Resource )
79+ expect ( value ) . to be_a_kind_of ( RDF ::Resource )
8080 true
8181 end
8282 end
8383
8484 RSpec ::Matchers . define :be_a_node do
8585 match do |value |
86- value . should be_a_kind_of ( RDF ::Node )
86+ expect ( value ) . to be_a_kind_of ( RDF ::Node )
8787 true
8888 end
8989 end
9090
9191 RSpec ::Matchers . define :be_a_uri do
9292 match do |value |
93- value . should be_a_kind_of ( RDF ::URI )
93+ expect ( value ) . to be_a_kind_of ( RDF ::URI )
9494 true
9595 end
9696 end
9797
9898 RSpec ::Matchers . define :be_a_value do
9999 match do |value |
100- value . should be_a_kind_of ( RDF ::Value )
100+ expect ( value ) . to be_a_kind_of ( RDF ::Value )
101101 true
102102 end
103103 end
104104
105105 RSpec ::Matchers . define :be_a_list do
106106 match do |value |
107- value . should be_an ( RDF ::List )
107+ expect ( value ) . to be_an ( RDF ::List )
108108 true
109109 end
110110 end
111111
112112 RSpec ::Matchers . define :be_a_vocabulary do |base_uri |
113113 match do |vocabulary |
114- vocabulary . should be_a_kind_of ( Module )
115- vocabulary . should respond_to ( :to_uri )
116- vocabulary . to_uri . to_s . should == base_uri
117- vocabulary . should respond_to ( :[] )
114+ expect ( vocabulary ) . to be_a_kind_of ( Module )
115+ expect ( vocabulary ) . to respond_to ( :to_uri )
116+ expect ( vocabulary . to_uri . to_s ) . to eq base_uri
117+ expect ( vocabulary ) . to respond_to ( :[] )
118118 true
119119 end
120120 end
121121
122122 RSpec ::Matchers . define :have_properties do |base_uri , properties |
123123 match do |vocabulary |
124124 properties . map { |p | p . to_sym } . each do |property |
125- vocabulary [ property ] . should be_a_uri
126- vocabulary [ property ] . to_s . should == "#{ base_uri } #{ property } "
127- vocabulary . should respond_to ( property )
125+ expect ( vocabulary [ property ] ) . to be_a_uri
126+ expect ( vocabulary [ property ] . to_s ) . to eq "#{ base_uri } #{ property } "
127+ expect ( vocabulary ) . to respond_to ( property )
128128 expect { vocabulary . send ( property ) } . not_to raise_error
129- vocabulary . send ( property ) . should be_a_uri
130- vocabulary . send ( property . to_s ) . should be_a_uri
131- vocabulary . send ( property ) . to_s . should == "#{ base_uri } #{ property } "
129+ expect ( vocabulary . send ( property ) ) . to be_a_uri
130+ expect ( vocabulary . send ( property . to_s ) ) . to be_a_uri
131+ expect ( vocabulary . send ( property ) . to_s ) . to eq "#{ base_uri } #{ property } "
132132 end
133133 true
134134 end
@@ -145,14 +145,14 @@ module Matchers
145145
146146 RSpec ::Matchers . define :be_a_repository do
147147 match do |repository |
148- repository . should be_a_kind_of ( RDF ::Repository )
148+ expect ( repository ) . to be_a_kind_of ( RDF ::Repository )
149149 true
150150 end
151151 end
152152
153153 RSpec ::Matchers . define :be_a_repository_of_size do |size |
154154 match do |repository |
155- repository . should be_a_repository
155+ expect ( repository ) . to be_a_repository
156156 repository . size == size
157157 end
158158 end
0 commit comments