lib/lopata/runner.rb in lopata-0.1.0 vs lib/lopata/runner.rb in lopata-0.1.1

- old
+ new

@@ -1,11 +1,13 @@ require 'thor' require_relative 'generators/app' require_relative 'config' require_relative 'world' +require_relative 'loader' require_relative '../lopata' require_relative 'observers' +require_relative 'condition' module Lopata class Runner < Thor desc 'test', 'Run tests' option :env, default: :qa, aliases: 'e' @@ -16,16 +18,14 @@ option :build, aliases: 'b' option :keep, type: :boolean, aliases: 'k' option :text, aliases: 't' def test(*args) configure_from_options - - # Dir["./spec/support/**/*.rb"].sort.each { |f| require f} + Lopata::Loader.load_shared_steps + Lopata::Loader.load_scenarios(*args) world = Lopata::Config.world - world.setup_observers - world.load_shared_steps - world.load_scenarios(*args) + world.start world.scenarios.each { |s| s.run } world.finish end default_task :test @@ -47,11 +47,9 @@ keep: options[:keep], text: options[:text] } Lopata::Config.init(options[:env]) Lopata::Config.initialize_test - # ENV['HOME'] = File.absolute_path('.') # disable warning on rspec loading on windows - # Lopata::Config.init_rspec end end end end