Sha256: b8fe5397a102e77e0f0aa587cd863dad3065a3aea3eb6db13c7653c2a783d637

Contents?: true

Size: 852 Bytes

Versions: 42

Compression:

Stored size: 852 Bytes

Contents

require "rake"

shared_context "rake" do
  let(:rake)      { Rake::Application.new }
  let(:task_name) { self.class.parent_groups.first.description }
  let(:task_path) { "#{task_name.split(":").first}" }
  subject         { rake[task_name] }

  def loaded_files_excluding_current_rake_file
    $".reject {|file| file == File.join(File.dirname(__FILE__), "../rake/tasks", :task_path) }
  end

  before do
    # rake.rake_require "../rake/test", [ File.dirname(__FILE__) ], loaded_files_excluding_current_rake_file
    # rake.load_tasks
    Rake.application = rake
    # load "fwtoolkit/rake/tasks/#{task_path}.rb"

    # Object::const_get(:FWToolkit).const_get(:Rake).const_get("#{task_path.capitalize}Task".to_sym).new
    # rake.rake_require("../rake/tasks/#{task_path}", [File.dirname(__FILE__)], loaded_files_excluding_current_rake_file)

  end
end

Version data entries

42 entries across 42 versions & 1 rubygems

Version Path
fwtoolkit-2.6.4 spec/support/ctx_rake.rb
fwtoolkit-2.6.3 spec/support/ctx_rake.rb
fwtoolkit-2.6.2 spec/support/ctx_rake.rb
fwtoolkit-2.6.1 spec/support/ctx_rake.rb
fwtoolkit-2.6.0 spec/support/ctx_rake.rb
fwtoolkit-2.5.0 spec/support/ctx_rake.rb
fwtoolkit-2.4.0 spec/support/ctx_rake.rb
fwtoolkit-2.3.6 spec/support/ctx_rake.rb
fwtoolkit-2.3.5 spec/support/ctx_rake.rb
fwtoolkit-2.3.4 spec/support/ctx_rake.rb
fwtoolkit-2.3.3 spec/support/ctx_rake.rb
fwtoolkit-2.3.2 spec/support/ctx_rake.rb
fwtoolkit-2.3.1 spec/support/ctx_rake.rb
fwtoolkit-2.3.0 spec/support/ctx_rake.rb
fwtoolkit-2.2.4 spec/support/ctx_rake.rb
fwtoolkit-2.2.3 spec/support/ctx_rake.rb
fwtoolkit-2.2.2 spec/support/ctx_rake.rb
fwtoolkit-2.2.1 spec/support/ctx_rake.rb
fwtoolkit-2.2.0 spec/support/ctx_rake.rb
fwtoolkit-2.1.10 spec/support/ctx_rake.rb