Sha256: ec3fea6cd4fbdc8b9a87415ab846dc039c9daa023401b70072d669bf9766304d
Contents?: true
Size: 1.17 KB
Versions: 2
Compression:
Stored size: 1.17 KB
Contents
require 'thor' require_relative 'generators/app' require_relative 'config' module Lopata class Runner < Thor desc 'test', 'Run tests' option :env, default: :qa, aliases: 'e' option :"no-log", type: :boolean, aliases: 'n' option :focus, type: :boolean, aliases: 'f' option :rerun, type: :boolean, aliases: 'r' option :users, type: :array, aliases: 'u' option :build, aliases: 'b' def test require 'rspec' Dir["./spec/support/**/*.rb"].sort.each { |f| require f} ENV['HOME'] = File.absolute_path('.') # disable warning on rspec loading on windows Lopata::Config.ops = { focus: options[:focus], rerun: options[:rerun], users: options[:users], build: options[:build], env: options[:env], } Lopata::Config.init(options[:env]) Lopata::Config.initialize_test ::RSpec::Core::Runner.run ['spec'] end default_task :test register Generators::App, :new, 'lopata new project-name', 'Init new lopata projects' end end raise 'No Lopatafile found in running dir' unless File.exists?('./Lopatafile') eval File.binread('./Lopatafile')
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
lopata-0.0.3 | lib/lopata/runner.rb |
lopata-0.0.2 | lib/lopata/runner.rb |