spec/lib/tasks/mesh.rake_spec.rb in qa-0.0.3 vs spec/lib/tasks/mesh.rake_spec.rb in qa-0.1.0
- old
+ new
@@ -30,10 +30,10 @@
ENV['MESH_FILE'] = old_mesh_file
end
it "should create or update all records in the config file" do
ENV['MESH_FILE'] = "dummy"
input = StringIO.new("*NEWRECORD\nUI = 5\nMH = test\n")
- File.should_receive(:open).with("dummy").and_yield(input)
+ expect(File).to receive(:open).with("dummy").and_yield(input)
@rake[@task_name].invoke
term = Qa::SubjectMeshTerm.find_by_term_id(5)
term.should_not be_nil
term.term.should == "test"
ENV['MESH_FILE'] = nil