require_relative "spec_helper" include CliTester include GivenFilesystemSpecHelpers describe "command line interface" do use_given_filesystem(keep_files: true) it "does not find yes_ship_it.conf" do dir = given_directory expect(run_command(working_directory: dir)).to exit_with_error(1, /yes_ship_it.conf/) end describe "runs" do it "fails when version is not there" do dir = given_directory setup_test_git_repo("000", dir) expected_output = < Date: Fri Jul 10 23:54:01 2015 +0200 Implement magic method commit 40ec45663e2a3cf32895b451cc43e667463af431 Author: Cornelius Schumacher Date: Fri Jul 10 23:50:08 2015 +0200 Add magic method EOT expect(run_command(args: ["changelog"], working_directory: File.join(dir, "red_herring"))). to exit_with_success(expected_output) end end end