Sha256: 9d2e1ac2cbf897e71f76525842c947f11440d5ecbd5b881403257bb1868b50c1

Contents?: true

Size: 425 Bytes

Versions: 10

Compression:

Stored size: 425 Bytes

Contents

RSpec.shared_context "with temporary directory" do
  <% if configuration.build_refinements %>using Refinements::Pathname<% end %>

  let(:temp_dir) { Bundler.root.join "tmp/rspec" }

  around do |example|
    <%= configuration.build_refinements ? "temp_dir.make_path" : "FileUtils.mkdir_p temp_dir" %>
    example.run
    <%= configuration.build_refinements ? "temp_dir.remove_tree" : "FileUtils.rm_rf temp_dir" %>
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
rubysmith-6.10.0 lib/rubysmith/templates/%project_name%/spec/support/shared_contexts/temp_dir.rb.erb
rubysmith-6.9.0 lib/rubysmith/templates/%project_name%/spec/support/shared_contexts/temp_dir.rb.erb
rubysmith-6.6.0 lib/rubysmith/templates/%project_name%/spec/support/shared_contexts/temp_dir.rb.erb
rubysmith-6.5.0 lib/rubysmith/templates/%project_name%/spec/support/shared_contexts/temp_dir.rb.erb
rubysmith-6.4.0 lib/rubysmith/templates/%project_name%/spec/support/shared_contexts/temp_dir.rb.erb
rubysmith-6.3.0 lib/rubysmith/templates/%project_name%/spec/support/shared_contexts/temp_dir.rb.erb
rubysmith-6.2.1 lib/rubysmith/templates/%project_name%/spec/support/shared_contexts/temp_dir.rb.erb
rubysmith-6.2.0 lib/rubysmith/templates/%project_name%/spec/support/shared_contexts/temp_dir.rb.erb
rubysmith-6.1.0 lib/rubysmith/templates/%project_name%/spec/support/shared_contexts/temp_dir.rb.erb
rubysmith-6.0.0 lib/rubysmith/templates/%project_name%/spec/support/shared_contexts/temp_dir.rb.erb