Sha256: a2b8f4e6658deec62b7797843c0f279d1a7e2834f2b255890ee572e57394e064

Contents?: true

Size: 1.1 KB

Versions: 19

Compression:

Stored size: 1.1 KB

Contents

# frozen_string_literal: true

require 'rubygems'
require 'rake'
require 'rake/testtask'
require 'rspec/core/rake_task'
require 'bundler/gem_tasks'

require 'solidus_backend'
require 'spree/testing_support/dummy_app/rake_tasks'

RSpec::Core::RakeTask.new
task default: [:spec, 'spec:js']

DummyApp::RakeTasks.new(
  gem_root: File.expand_path(__dir__),
  lib_name: 'solidus_backend'
)

task :teaspoon do
  require 'teaspoon'
  Rake::Task['dummy_environment'].invoke
  require "teaspoon/console"

  options = {
    files: ENV["files"].nil? ? [] : ENV["files"].split(","),
    suite: ENV["suite"],
    coverage: ENV["coverage"],
    driver_options: ENV["driver_options"],
  }

  options.delete_if { |_k, v| v.nil? }

  abort("rake teaspoon failed") if Teaspoon::Console.new(options).failures?
end

desc "Run javascript specs"
task 'spec:js' => :teaspoon

namespace :teaspoon do
  task :server do
    require 'teaspoon'
    Rake::Task['dummy_environment'].invoke
    require 'teaspoon/server'

    server = Teaspoon::Server.new
    server.start
    puts "#{server.url}/teaspoon"
    sleep
  end
end

task test_app: 'db:reset'

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
solidus_backend-4.4.1 Rakefile
solidus_backend-4.4.0 Rakefile
solidus_backend-4.3.4 Rakefile
solidus_backend-4.2.4 Rakefile
solidus_backend-4.1.5 Rakefile
solidus_backend-4.3.3 Rakefile
solidus_backend-4.3.2 Rakefile
solidus_backend-4.1.4 Rakefile
solidus_backend-4.3.1 Rakefile
solidus_backend-4.3.0 Rakefile
solidus_backend-4.2.3 Rakefile
solidus_backend-4.1.3 Rakefile
solidus_backend-4.0.4 Rakefile
solidus_backend-3.4.6 Rakefile
solidus_backend-4.0.3 Rakefile
solidus_backend-4.1.2 Rakefile
solidus_backend-4.2.2 Rakefile
solidus_backend-3.4.5 Rakefile
solidus_backend-4.2.1 Rakefile