From 232aca91bced48f77efa31b0a0ddf696a17d4cfd Mon Sep 17 00:00:00 2001 From: Max Meyer Date: Thu, 25 Jun 2015 22:26:46 +0200 Subject: [PATCH] Make testing a little bit easier and require features-directory to make subdirectories in cucumber work --- .rubocop.yml | 1 + Gemfile | 2 +- gem_rake_helper.rb | 2 +- middleman-core/.rspec | 1 + middleman-core/cucumber.yml | 2 ++ 5 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 middleman-core/.rspec create mode 100644 middleman-core/cucumber.yml diff --git a/.rubocop.yml b/.rubocop.yml index 2a518da3..68908de8 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -14,6 +14,7 @@ AllCops: - 'middleman-core/fixtures/**/*' - 'middleman-core/features/**/*' - 'middleman-core/spec/**/*' + DisplayCopNames: true LineLength: Enabled: false MethodLength: diff --git a/Gemfile b/Gemfile index f34fbaec..6ed44aac 100644 --- a/Gemfile +++ b/Gemfile @@ -9,7 +9,7 @@ gem 'pry', '~> 0.10', group: :development gem 'aruba', '~> 0.6' gem 'rspec', '~> 3.0' gem 'fivemat', '~> 1.3' -gem 'cucumber', '~> 1.3' +gem 'cucumber', '~> 2.0' # Optional middleman dependencies, included for tests gem 'less', '2.3', require: false diff --git a/gem_rake_helper.rb b/gem_rake_helper.rb index 5f95c90e..a90ea7dc 100644 --- a/gem_rake_helper.rb +++ b/gem_rake_helper.rb @@ -21,7 +21,7 @@ Cucumber::Rake::Task.new do |t| exempt_tags << '--tags ~@encoding' unless Object.const_defined?(:Encoding) exempt_tags << '--tags ~@nowindows' if Gem.win_platform? exempt_tags << '--tags ~@travishatesme' if ENV['TRAVIS'] == 'true' - t.cucumber_opts = "--color #{exempt_tags.join(' ')} --strict --format #{ENV['CUCUMBER_FORMAT'] || 'Fivemat'}" + t.cucumber_opts = "--require features --color #{exempt_tags.join(' ')} --strict --format #{ENV['CUCUMBER_FORMAT'] || 'Fivemat'}" end Cucumber::Rake::Task.new(:cucumber_wip) do |t| diff --git a/middleman-core/.rspec b/middleman-core/.rspec new file mode 100644 index 00000000..4e1e0d2f --- /dev/null +++ b/middleman-core/.rspec @@ -0,0 +1 @@ +--color diff --git a/middleman-core/cucumber.yml b/middleman-core/cucumber.yml new file mode 100644 index 00000000..a65d694e --- /dev/null +++ b/middleman-core/cucumber.yml @@ -0,0 +1,2 @@ +default: --require features --tags ~@wip +wip: --require features --tags @wip