Sha256: 04eaed99ab0952c4c3b9183ceffc171e34280a6a12b1f4b66b8db6cc9c4ed3a1

Contents?: true

Size: 752 Bytes

Versions: 17

Compression:

Stored size: 752 Bytes

Contents

# frozen_string_literal: true

require "./test/helper"

clean_describe "list locations" do
  subject { run_cmd("list locations") }

  describe "when file does not exist" do
    let(:content) { nil }

    it "does not list anything" do
      stdout_only ""
    end
  end

  describe "when file is empty" do
    let(:content) { "" }

    it "does not list anything" do
      stdout_only ""
    end
  end

  describe "when file has content" do
    # Use scrambled content to differentiate between output that is sorted and output that
    # only reads from the (usually-sorted) file.
    let(:content) { SCRAMBLED_CONTENT }

    it "lists locations in file order" do
      stdout_only <<-OUTPUT
Paris
Atlantis
Marie's Diner
      OUTPUT
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
friends-0.47 test/commands/list/locations_spec.rb
friends-0.46 test/commands/list/locations_spec.rb
friends-0.45 test/commands/list/locations_spec.rb
friends-0.44 test/commands/list/locations_spec.rb
friends-0.43 test/commands/list/locations_spec.rb
friends-0.42 test/commands/list/locations_spec.rb
friends-0.41 test/commands/list/locations_spec.rb
friends-0.40 test/commands/list/locations_spec.rb
friends-0.39 test/commands/list/locations_spec.rb
friends-0.38 test/commands/list/locations_spec.rb
friends-0.37 test/commands/list/locations_spec.rb
friends-0.36 test/commands/list/locations_spec.rb
friends-0.35 test/commands/list/locations_spec.rb
friends-0.34 test/commands/list/locations_spec.rb
friends-0.33 test/commands/list/locations_spec.rb
friends-0.32 test/commands/list/locations_spec.rb
friends-0.31 test/commands/list/locations_spec.rb