Guest User

Untitled

a guest
May 24th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. require 'binary_search'
  2.  
  3. RSpec.describe BinarySearch, "#sort_func" do
  4. context "with array searches the required" do
  5. it "searches!" do
  6. binary_search = BinarySearch.new
  7. expect(binary_search.search_func([1, 2, 3, 4, 5, 6, 7, 8], 5)).to eql 4
  8. end
  9. it "return string if not found" do
  10. binary_search = BinarySearch.new
  11. expect(binary_search.search_func([1, 2, 3, 4, 5, 6, 7, 8], 9)).to eql "Value not found in array"
  12. end
  13. end
  14. end
Add Comment
Please, Sign In to add comment