Sha256: ba1a2de9e336f632950ed10138c4d2fc57ae38fd497bab1ad31b04f1c28c2f4e

Contents?: true

Size: 426 Bytes

Versions: 49

Compression:

Stored size: 426 Bytes

Contents

RSpec.shared_context "with temporary directory" do
  <% if configuration.build_refinements %>using Refinements::Pathnames<% 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

49 entries across 49 versions & 1 rubygems

Version Path
rubysmith-1.0.0 lib/rubysmith/templates/%project_name%/spec/support/shared_contexts/temp_dir.rb.erb
rubysmith-0.16.1 lib/rubysmith/templates/%project_name%/spec/support/shared_contexts/temp_dir.rb.erb
rubysmith-0.16.0 lib/rubysmith/templates/%project_name%/spec/support/shared_contexts/temp_dir.rb.erb
rubysmith-0.15.0 lib/rubysmith/templates/%project_name%/spec/support/shared_contexts/temp_dir.rb.erb
rubysmith-0.14.0 lib/rubysmith/templates/%project_name%/spec/support/shared_contexts/temp_dir.rb.erb
rubysmith-0.13.0 lib/rubysmith/templates/%project_name%/spec/support/shared_contexts/temp_dir.rb.erb
rubysmith-0.12.0 lib/rubysmith/templates/%project_name%/spec/support/shared_contexts/temp_dir.rb.erb
rubysmith-0.11.0 lib/rubysmith/templates/%project_name%/spec/support/shared_contexts/temp_dir.rb.erb
rubysmith-0.10.0 lib/rubysmith/templates/%project_name%/spec/support/shared_contexts/temp_dir.rb.erb