Sha256: 175e31f1aa41220fb77871b6064b0fb87fc5595d5c0483112e72c2015c81242f

Contents?: true

Size: 410 Bytes

Versions: 10

Compression:

Stored size: 410 Bytes

Contents

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

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

  around do |example|
    <%= settings.build_refinements ? "temp_dir.make_path" : "FileUtils.mkdir_p temp_dir" %>
    example.run
    <%= settings.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-7.9.0 lib/rubysmith/templates/%project_name%/spec/support/shared_contexts/temp_dir.rb.erb
rubysmith-7.8.0 lib/rubysmith/templates/%project_name%/spec/support/shared_contexts/temp_dir.rb.erb
rubysmith-7.7.0 lib/rubysmith/templates/%project_name%/spec/support/shared_contexts/temp_dir.rb.erb
rubysmith-7.6.0 lib/rubysmith/templates/%project_name%/spec/support/shared_contexts/temp_dir.rb.erb
rubysmith-7.5.0 lib/rubysmith/templates/%project_name%/spec/support/shared_contexts/temp_dir.rb.erb
rubysmith-7.4.0 lib/rubysmith/templates/%project_name%/spec/support/shared_contexts/temp_dir.rb.erb
rubysmith-7.3.0 lib/rubysmith/templates/%project_name%/spec/support/shared_contexts/temp_dir.rb.erb
rubysmith-7.2.0 lib/rubysmith/templates/%project_name%/spec/support/shared_contexts/temp_dir.rb.erb
rubysmith-7.1.0 lib/rubysmith/templates/%project_name%/spec/support/shared_contexts/temp_dir.rb.erb
rubysmith-7.0.0 lib/rubysmith/templates/%project_name%/spec/support/shared_contexts/temp_dir.rb.erb