Sha256: a710c34ebabd31b712fb70ee18ca6a6d81c41f3cc443076a9fd399d4651bb931

Contents?: true

Size: 611 Bytes

Versions: 3

Compression:

Stored size: 611 Bytes

Contents

require 'rails_config_i18n'
require 'pathname'
require 'bundler/setup'

def in_editor?
  ENV.has_key?('TM_MODE') || ENV.has_key?('EMACS') || ENV.has_key?('VIM')
end

RSpec.configure do |c|
  c.color_enabled = !in_editor?
  c.run_all_when_everything_filtered = true

  # setup fixtures path
  c.before(:all) do
    @fixture_path = Pathname.new(File.join(File.dirname(__FILE__), "/fixtures"))
    raise "Fixture folder not found: #{@fixture_path}" unless @fixture_path.directory?
  end

  # returns the file path of a fixture setting file
  def setting_path(filename)
    @fixture_path.join(filename)
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rails_config_i18n-0.3.1.3 spec/spec_helper.rb
rails_config_i18n-0.3.1.2 spec/spec_helper.rb
rails_config_i18n-0.3.1.1 spec/spec_helper.rb