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-5.9.0 lib/rubysmith/templates/%project_name%/spec/support/shared_contexts/temp_dir.rb.erb
rubysmith-5.8.1 lib/rubysmith/templates/%project_name%/spec/support/shared_contexts/temp_dir.rb.erb
rubysmith-5.8.0 lib/rubysmith/templates/%project_name%/spec/support/shared_contexts/temp_dir.rb.erb
rubysmith-5.7.0 lib/rubysmith/templates/%project_name%/spec/support/shared_contexts/temp_dir.rb.erb
rubysmith-5.6.0 lib/rubysmith/templates/%project_name%/spec/support/shared_contexts/temp_dir.rb.erb
rubysmith-5.5.0 lib/rubysmith/templates/%project_name%/spec/support/shared_contexts/temp_dir.rb.erb
rubysmith-5.4.0 lib/rubysmith/templates/%project_name%/spec/support/shared_contexts/temp_dir.rb.erb
rubysmith-5.3.0 lib/rubysmith/templates/%project_name%/spec/support/shared_contexts/temp_dir.rb.erb
rubysmith-5.2.0 lib/rubysmith/templates/%project_name%/spec/support/shared_contexts/temp_dir.rb.erb
rubysmith-5.1.0 lib/rubysmith/templates/%project_name%/spec/support/shared_contexts/temp_dir.rb.erb
rubysmith-5.0.1 lib/rubysmith/templates/%project_name%/spec/support/shared_contexts/temp_dir.rb.erb
rubysmith-4.9.0 lib/rubysmith/templates/%project_name%/spec/support/shared_contexts/temp_dir.rb.erb
rubysmith-4.8.0 lib/rubysmith/templates/%project_name%/spec/support/shared_contexts/temp_dir.rb.erb
rubysmith-4.7.0 lib/rubysmith/templates/%project_name%/spec/support/shared_contexts/temp_dir.rb.erb
rubysmith-4.6.1 lib/rubysmith/templates/%project_name%/spec/support/shared_contexts/temp_dir.rb.erb
rubysmith-4.6.0 lib/rubysmith/templates/%project_name%/spec/support/shared_contexts/temp_dir.rb.erb
rubysmith-4.5.0 lib/rubysmith/templates/%project_name%/spec/support/shared_contexts/temp_dir.rb.erb
rubysmith-4.4.0 lib/rubysmith/templates/%project_name%/spec/support/shared_contexts/temp_dir.rb.erb
rubysmith-4.3.0 lib/rubysmith/templates/%project_name%/spec/support/shared_contexts/temp_dir.rb.erb
rubysmith-4.2.0 lib/rubysmith/templates/%project_name%/spec/support/shared_contexts/temp_dir.rb.erb