From e81cf3a52fc9cf424e5ec344d993a9cb90627e13 Mon Sep 17 00:00:00 2001 From: Thibault Jouan Date: Tue, 14 Apr 2015 02:59:48 +0000 Subject: [PATCH] Clean up tests * Remove deprecated tags; * Improve scenarios, steps and specs descriptions. --- features/actions/quit.feature | 4 ++-- features/cli/run_control.feature | 2 +- features/run_control/evaluation.feature | 3 +-- features/steps/x_steps.rb | 4 ++-- spec/uh/wm/runner_spec.rb | 4 ++-- 5 files changed, 8 insertions(+), 9 deletions(-) diff --git a/features/actions/quit.feature b/features/actions/quit.feature index 40c0839..60a2e57 100644 --- a/features/actions/quit.feature +++ b/features/actions/quit.feature @@ -1,6 +1,6 @@ Feature: quit action - Scenario: quits on keybing press + Scenario: quits on alt+q keys press Given uhwm is running - When I press the default quit key binding + When I press the alt+q keys Then uhwm should terminate successfully diff --git a/features/cli/run_control.feature b/features/cli/run_control.feature index 84c7832..020332c 100644 --- a/features/cli/run_control.feature +++ b/features/cli/run_control.feature @@ -1,6 +1,6 @@ Feature: run control file path CLI option - Scenario: changes the path to run control file + Scenario: specifies run control file path Given a file named uhwmrc.rb with: """ puts 'run control evaluation' diff --git a/features/run_control/evaluation.feature b/features/run_control/evaluation.feature index 24eb4bd..7c20df0 100644 --- a/features/run_control/evaluation.feature +++ b/features/run_control/evaluation.feature @@ -1,7 +1,6 @@ -@mocked_home_directory Feature: run control file evaluation - Scenario: evaluates the default run control file when it exists + Scenario: evaluates the default run control file when present Given a file named .uhwmrc.rb with: """ puts 'run control evaluation' diff --git a/features/steps/x_steps.rb b/features/steps/x_steps.rb index 844d6c2..c2950e7 100644 --- a/features/steps/x_steps.rb +++ b/features/steps/x_steps.rb @@ -1,5 +1,5 @@ -When /^I press the default quit key binding$/ do - x_key 'alt+q' +When /^I press the ([^ ]+) keys?$/ do |keys| + x_key keys end Then /^it must connect to X display$/ do diff --git a/spec/uh/wm/runner_spec.rb b/spec/uh/wm/runner_spec.rb index 02c41bd..b04f493 100644 --- a/spec/uh/wm/runner_spec.rb +++ b/spec/uh/wm/runner_spec.rb @@ -60,7 +60,7 @@ module Uh end describe '#evaluate_run_control' do - context 'when run control file exists' do + context 'when run control file is present' do it 'evaluates the run control file' do with_file 'throw :run_control' do |f| env.rc_path = f.path @@ -69,7 +69,7 @@ module Uh end end - context 'when run control file does not exist' do + context 'when run control file is not present' do it 'does not raise any error' do expect { runner.evaluate_run_control }.not_to raise_error end