Sha256: f1c5592ca9887f258da1e6cd57ff4f63ce8ebc526762c744b6b28f85eef91ec8

Contents?: true

Size: 234 Bytes

Versions: 9

Compression:

Stored size: 234 Bytes

Contents

# needs file and file_content defined
shared_context 'a file exists' do
  before :each do
    File.open(file, 'w') do |f|
      f.write file_content
    end
  end

  after :each do
    File.delete(file) if File.exist?(file)
  end
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
chutney-1.6.3 spec/shared_contexts/file_exists.rb
chutney-1.6.2 spec/shared_contexts/file_exists.rb
chutney-1.6.1 spec/shared_contexts/file_exists.rb
chutney-1.6.0 spec/shared_contexts/file_exists.rb
chutney-0.5.0 spec/shared_contexts/file_exists.rb
gherkin_lint-1.2.2 spec/shared_contexts/file_exists.rb
gherkin_lint-1.2.1 spec/shared_contexts/file_exists.rb
gherkin_lint-1.1.0 spec/shared_contexts/file_exists.rb
gherkin_lint-1.0.0 spec/shared_contexts/file_exists.rb