@@ -20,14 +20,14 @@ module RDF_Reader
2020
2121 describe ".open" do
2222 before ( :each ) do
23- RDF ::Util ::File . stub! ( :open_file ) . and_yield ( StringIO . new ( "foo" ) )
23+ RDF ::Util ::File . stub ( :open_file ) . and_yield ( StringIO . new ( "foo" ) )
2424 end
2525
2626 it "yields reader given file_name" do
2727 @reader_class . format . each do |f |
28- RDF ::Util ::File . stub! ( :open_file ) . and_yield ( StringIO . new ( "foo" ) )
28+ RDF ::Util ::File . stub ( :open_file ) . and_yield ( StringIO . new ( "foo" ) )
2929 f . file_extensions . each_pair do |sym , content_type |
30- reader_mock = mock ( "reader" )
30+ reader_mock = double ( "reader" )
3131 reader_mock . should_receive ( :got_here )
3232 @reader_class . should_receive ( :for ) . with ( :file_name => "foo.#{ sym } " ) . and_return ( @reader_class )
3333 @reader_class . open ( "foo.#{ sym } " ) do |r |
@@ -40,9 +40,9 @@ module RDF_Reader
4040
4141 it "yields reader given symbol" do
4242 @reader_class . format . each do |f |
43- RDF ::Util ::File . stub! ( :open_file ) . and_yield ( StringIO . new ( "foo" ) )
43+ RDF ::Util ::File . stub ( :open_file ) . and_yield ( StringIO . new ( "foo" ) )
4444 sym = f . to_sym # Like RDF::NTriples::Format => :ntriples
45- reader_mock = mock ( "reader" )
45+ reader_mock = double ( "reader" )
4646 reader_mock . should_receive ( :got_here )
4747 @reader_class . should_receive ( :for ) . with ( sym ) . and_return ( @reader_class )
4848 @reader_class . open ( "foo.#{ sym } " , :format => sym ) do |r |
@@ -54,9 +54,9 @@ module RDF_Reader
5454
5555 it "yields reader given {:file_name => file_name}" do
5656 @reader_class . format . each do |f |
57- RDF ::Util ::File . stub! ( :open_file ) . and_yield ( StringIO . new ( "foo" ) )
57+ RDF ::Util ::File . stub ( :open_file ) . and_yield ( StringIO . new ( "foo" ) )
5858 f . file_extensions . each_pair do |sym , content_type |
59- reader_mock = mock ( "reader" )
59+ reader_mock = double ( "reader" )
6060 reader_mock . should_receive ( :got_here )
6161 @reader_class . should_receive ( :for ) . with ( :file_name => "foo.#{ sym } " ) . and_return ( @reader_class )
6262 @reader_class . open ( "foo.#{ sym } " , :file_name => "foo.#{ sym } " ) do |r |
@@ -69,9 +69,9 @@ module RDF_Reader
6969
7070 it "yields reader given {:content_type => 'a/b'}" do
7171 @reader_class . format . each do |f |
72- RDF ::Util ::File . stub! ( :open_file ) . and_yield ( StringIO . new ( "foo" ) )
72+ RDF ::Util ::File . stub ( :open_file ) . and_yield ( StringIO . new ( "foo" ) )
7373 f . content_types . each_pair do |content_type , formats |
74- reader_mock = mock ( "reader" )
74+ reader_mock = double ( "reader" )
7575 reader_mock . should_receive ( :got_here )
7676 @reader_class . should_receive ( :for ) . with ( :content_type => content_type , :file_name => "foo" ) . and_return ( @reader_class )
7777 @reader_class . open ( "foo" , :content_type => content_type ) do |r |
@@ -92,7 +92,7 @@ module RDF_Reader
9292
9393 describe ".new" do
9494 it "sets @input to StringIO given a string" do
95- reader_mock = mock ( "reader" )
95+ reader_mock = double ( "reader" )
9696 reader_mock . should_receive ( :got_here )
9797 @reader_class . new ( "string" ) do |r |
9898 reader_mock . got_here
@@ -101,7 +101,7 @@ module RDF_Reader
101101 end
102102
103103 it "sets @input to input given something other than a string" do
104- reader_mock = mock ( "reader" )
104+ reader_mock = double ( "reader" )
105105 reader_mock . should_receive ( :got_here )
106106 file = StringIO . new ( "" )
107107 @reader_class . new ( file ) do |r |
@@ -122,7 +122,7 @@ module RDF_Reader
122122 end
123123
124124 it "sets canonicalize given :canonicalize => true" do
125- reader_mock = mock ( "reader" )
125+ reader_mock = double ( "reader" )
126126 reader_mock . should_receive ( :got_here )
127127 @reader_class . new ( "string" , :canonicalize => true ) do |r |
128128 reader_mock . got_here
@@ -131,7 +131,7 @@ module RDF_Reader
131131 end
132132
133133 it "sets intern given :intern => true" do
134- reader_mock = mock ( "reader" )
134+ reader_mock = double ( "reader" )
135135 reader_mock . should_receive ( :got_here )
136136 @reader_class . new ( "string" , :intern => true ) do |r |
137137 reader_mock . got_here
@@ -140,7 +140,7 @@ module RDF_Reader
140140 end
141141
142142 it "sets prefixes given :prefixes => {}" do
143- reader_mock = mock ( "reader" )
143+ reader_mock = double ( "reader" )
144144 reader_mock . should_receive ( :got_here )
145145 @reader_class . new ( "string" , :prefixes => { :a => "b" } ) do |r |
146146 reader_mock . got_here
0 commit comments