require 'rspec' require_relative 'category_update' describe Categories do include Categories it "should sort the cafe into LS1 Small category" do @row = Hash['cafe' => "Test Cafe", 'post_code' => "LS1 202", 'number_of_chairs' => 10] expect(find_category(@row)).to eq("LS1 Small") end it "should sort the cafe into LS1 Medium category" do @row = Hash['cafe' => "Test Cafe", 'post_code' => "LS1 202", 'number_of_chairs' => 15] expect(find_category(@row)).to eq("LS1 Medium") end it "should sort the cafe into LS1 Large category" do @row = Hash['cafe' => "Test Cafe", 'post_code' => "LS1 202", 'number_of_chairs' => 150] expect(find_category(@row)).to eq("LS1 Large") end it "should sort the cafe into LS2 Small category" do @row = Hash['cafe' => "Test Cafe", 'post_code' => "LS2 202", 'number_of_chairs' => 10] expect(find_category(@row)).to eq("LS2 Small") end it "should sort the cafe into LS2 Medium category" do @row = Hash['cafe' => "Test Cafe", 'post_code' => "LS2 202", 'number_of_chairs' => 15] expect(find_category(@row)).to eq("LS2 Medium") end it "should sort the cafe into LS2 Large category" do @row = Hash['cafe' => "Test Cafe", 'post_code' => "LS2 202", 'number_of_chairs' => 150] expect(find_category(@row)).to eq("LS2 Large") end it "should sort the cafe into the 'other' category" do @row = Hash['cafe' => "Test Cafe", 'post_code' => "LS10 202", 'number_of_chairs' => 150] expect(find_category(@row)).to eq("other") end end