Sha256: 75e68fa457182f553eeb43bcc895c0066ec6469702750ca7d7944a430dbe46bc
Contents?: true
Size: 808 Bytes
Versions: 9
Compression:
Stored size: 808 Bytes
Contents
require 'spec_helper' require 'command_mapper/types/input_path' describe CommandMapper::Types::InputPath do describe "#validate" do context "when given a valid file path" do let(:value) { __FILE__ } it "must return true" do expect(subject.validate(value)).to be(true) end end context "when given a valid directory path" do let(:value) { __dir__ } it "must return true" do expect(subject.validate(value)).to be(true) end end context "when given a path that does not exist" do let(:value) { "/path/does/not/exist" } it "must return [false, 'path does not exist (...)']" do expect(subject.validate(value)).to eq( [false, "path does not exist (#{value.inspect})"] ) end end end end
Version data entries
9 entries across 9 versions & 1 rubygems