spec/integration/command_line_spec.rb in trollolo-0.1.1 vs spec/integration/command_line_spec.rb in trollolo-0.2.0

- old
+ new

@@ -13,39 +13,39 @@ def credentials_input_wrapper File.expand_path('../wrapper/credentials_input_wrapper', __FILE__) end -describe "command line" do +describe 'command line' do - it "processes help option" do - result = run_command(args: ["-h"]) + it 'processes help option' do + result = run_command(args: ['-h']) expect(result).to exit_with_success(/Commands:/) - expect(result.stdout).to match("trollolo help") - expect(result.stdout).to match("Options:") + expect(result.stdout).to match('trollolo help') + expect(result.stdout).to match('Options:') end - it "throws error on invalid command" do - result = run_command(cmd: trollolo_cmd, args: ["invalid_command"]) + it 'throws error on invalid command' do + result = run_command(cmd: trollolo_cmd, args: ['invalid_command']) expect(result).to exit_with_error(1, "Could not find command \"invalid_command\".\n") end - it "asks for authorization data" do - expect(run_command(cmd: credentials_input_wrapper, args: ["get-cards", "--board-id=myboardid"])).to exit_with_success("") + it 'asks for authorization data' do + expect(run_command(cmd: credentials_input_wrapper, args: ['get-cards', '--board-id=myboardid'])).to exit_with_success('') end - describe "burndown chart" do + describe 'burndown chart' do use_given_filesystem - it "inits burndown directory" do + it 'inits burndown directory' do path = given_directory - result = run_command(cmd: trollolo_cmd, args: ["burndown-init", "-o", "#{path}", "--board-id=myboardid"]) + result = run_command(cmd: trollolo_cmd, args: ['burndown-init', '-o', path.to_s, '--board-id=myboardid']) expect(result).to exit_with_success(/Preparing/) end - it "fails, if burndown data is not found" do + it 'fails, if burndown data is not found' do path = given_directory - result = run_command(cmd: trollolo_cmd, args: ["burndown", "-o", "#{path}"]) + result = run_command(cmd: trollolo_cmd, args: ['burndown', '-o', path.to_s]) expect(result).to exit_with_error(1, /burndown-data-01.yaml' not found/) end end end