Sha256: f56f24919b8313a68b01c82d1cad85b6cca21ef62aede6d86dae12625752db51

Contents?: true

Size: 695 Bytes

Versions: 16

Compression:

Stored size: 695 Bytes

Contents

require File.join(File.dirname(__FILE__), "..", "lib", "html_email_creator")

RSpec.configure do |config|
  config.color_enabled = true
  
  config.before :each do
    ARGV.replace []
  end
end

def fixture_dir(*pathparts)
  File.join(File.dirname(__FILE__), 'fixtures', pathparts.flatten)
end

def read_fixture(*pathparts)
  IO.read(fixture_dir(pathparts))
end

def clean_fixture_output
  Dir.glob(File.join(fixture_dir, "**", "Output", "**", "*.{html,txt}")).each do |file|
    File.delete(file)
  end
end

def run_in_fixture_dir(*pathparts, &block)
  current_dir = Dir.pwd
  Dir.chdir(fixture_dir(pathparts))
  HtmlEmailCreator.update_settings
  res = yield
  Dir.chdir(current_dir)
  res
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
html_email_creator-1.0.18 spec/spec_helper.rb
html_email_creator-1.0.16 spec/spec_helper.rb
html_email_creator-1.0.15 spec/spec_helper.rb
html_email_creator-1.0.14 spec/spec_helper.rb
html_email_creator-1.0.13 spec/spec_helper.rb
html_email_creator-1.0.10 spec/spec_helper.rb
html_email_creator-1.0.9 spec/spec_helper.rb
html_email_creator-1.0.8 spec/spec_helper.rb
html_email_creator-1.0.7 spec/spec_helper.rb
html_email_creator-1.0.6 spec/spec_helper.rb
html_email_creator-1.0.5 spec/spec_helper.rb
html_email_creator-1.0.4 spec/spec_helper.rb
html_email_creator-1.0.3 spec/spec_helper.rb
html_email_creator-1.0.2 spec/spec_helper.rb
html_email_creator-1.0.1 spec/spec_helper.rb
html_email_creator-1.0.0 spec/spec_helper.rb