Rakefile in watir-7.1.0 vs Rakefile in watir-7.2.0
- old
+ new
@@ -1,5 +1,7 @@
+# frozen_string_literal: true
+
$LOAD_PATH.unshift File.expand_path('lib', __dir__)
require 'bundler'
Bundler::GemHelper.install_tasks
@@ -14,24 +16,18 @@
RuboCop::RakeTask.new(:rubocop) do |t|
t.options = ['--display-cop-names']
end
-namespace :spec do
- RSpec::Core::RakeTask.new(:html) do |spec|
- spec.rspec_opts = "--format html --out #{ENV['SPEC_REPORT'] || 'specs.html'}"
- spec.pattern = 'spec/**/*_spec.rb'
- end
-end
-
{
html: 'https://www.w3.org/TR/html52/single-page.html',
svg: 'https://www.w3.org/TR/2018/CR-SVG2-20180807/single-page.html'
}.each do |type, spec_uri|
namespace type do
spec_path = "support/#{type}.html"
+ desc 'require generator'
task generator_lib: :lib do
require 'watir/generator'
end
desc "Download #{type.upcase} spec from #{spec_uri}"
@@ -97,10 +93,11 @@
YARD::Doctest::RakeTask.new do |task|
task.doctest_opts = ['-v']
end
namespace :changes do
+ desc 'Show how versions differ'
task :differ do
require './support/version_differ'
end
desc 'Update CHANGES.md'
@@ -120,9 +117,14 @@
end
task default: [:spec, 'yard:doctest']
namespace :spec do
+ RSpec::Core::RakeTask.new(:html) do |spec|
+ spec.rspec_opts = "--format html --out #{ENV['SPEC_REPORT'] || 'specs.html'}"
+ spec.pattern = 'spec/**/*_spec.rb'
+ end
+
require 'selenium-webdriver'
desc 'Run specs in all browsers'
task all_browsers: %i[browsers remote_browsers]