Sha256: 71cb4a2391b13a7a4e91022ba116005ee33c249f4e23f7c0e458077c709f77f1

Contents?: true

Size: 413 Bytes

Versions: 4

Compression:

Stored size: 413 Bytes

Contents

RSpec.shared_context "with temporary directory", :temp_dir do
  <% if realm.build_refinements %>using Refinements::Pathnames<% end %>

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

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

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rubysmith-0.8.0 lib/rubysmith/templates/%project_name%/spec/support/shared_contexts/temp_dir.rb.erb
rubysmith-0.7.0 lib/rubysmith/templates/%project_name%/spec/support/shared_contexts/temp_dir.rb.erb
rubysmith-0.6.1 lib/rubysmith/templates/%project_name%/spec/support/shared_contexts/temp_dir.rb.erb
rubysmith-0.6.0 lib/rubysmith/templates/%project_name%/spec/support/shared_contexts/temp_dir.rb.erb