Sha256: 562d24f0ca0eaf64578913a0d98955529bb2442b0cbda7e3f699ea3a25ea5c2c
Contents?: true
Size: 765 Bytes
Versions: 30
Compression:
Stored size: 765 Bytes
Contents
# # Rake task spec setup. # shared_context "rake" do |task_path:, task_name:| require 'rake' let(:task) do Rake::Task[task_name] end before(:each) do # we need to reenable the task or else `task.invoke` will only run the task # for the first example that runs. task.reenable end before(:all) do Rake::Task.clear # Note: Using `Rails.application.load_tasks` doesn't seem to work correctly # in the specs. The tasks each run twice when invoked instead of once. load task_path # Many tasks require the 'environment' task, which isn't needed in specs # since the environment is already loaded. So generate a fake one. Rake::Task.define_task(:environment) end after(:all) do Rake::Task.clear end end
Version data entries
30 entries across 30 versions & 1 rubygems