Sha256: 01ea95bd8930e2085788c3615e7b9c251f2cd9106b78003829d72a3c638a7413

Contents?: true

Size: 530 Bytes

Versions: 7

Compression:

Stored size: 530 Bytes

Contents

require 'rake'

shared_context 'rake' do
  let(:rake) { Rake::Application.new }
  let(:solution_name) { self.class.top_level_description }
  let(:solution_dir) { "spec/test_data/solutions/#{solution_name}" }
  let(:task_names) { rake.tasks.map{|t| t.name } }


  before do
    @original_app = Rake.application
    Dir.chdir(solution_dir)
    Rake.application = rake
    Rake.load_rakefile('Rakefile.rb')
  end

  after do
    Rake.application = @original_app
    Dir.chdir(@original_app.original_dir)
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
physique-0.3.10 spec/support/shared_contexts/rake.rb
physique-0.3.9 spec/support/shared_contexts/rake.rb
physique-0.3.8 spec/support/shared_contexts/rake.rb
physique-0.3.7 spec/support/shared_contexts/rake.rb
physique-0.3.6 spec/support/shared_contexts/rake.rb
physique-0.3.5 spec/support/shared_contexts/rake.rb
physique-0.3.4 spec/support/shared_contexts/rake.rb