Sha256: 9eb532e80319aa2a02b72a402b6fcb43098b2e88cc4628386e283e217b62e6ad
Contents?: true
Size: 924 Bytes
Versions: 18
Compression:
Stored size: 924 Bytes
Contents
# frozen_string_literal: true require "./test/helper" clean_describe "add location" do subject { run_cmd("add location #{location_name}") } let(:content) { CONTENT } describe "when location name is blank" do let(:location_name) { "' '" } it "prints an error message" do stderr_only 'Error: Expected "[Location Name]"' end end describe "when there is an existing location with that name" do let(:location_name) { "Paris" } it "prints an error message" do stderr_only 'Error: Location "Paris" already exists' end end describe "when there is no existing location with that name" do # This also tests that we can use multi-word names without quotes. let(:location_name) { "New England" } it "adds location" do line_added "- New England" end it "prints an output message" do stdout_only 'Location added: "New England"' end end end
Version data entries
18 entries across 18 versions & 1 rubygems