Sha256: 0b49bda88b4cc5288ef5dc5f369a5be8a0587bb147e278eed352b6e53f102049

Contents?: true

Size: 614 Bytes

Versions: 4

Compression:

Stored size: 614 Bytes

Contents

require 'rails_config'
require 'pathname'
require "bundler"
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

4 entries across 4 versions & 1 rubygems

Version Path
rails_config-0.1.6 spec/spec_helper.rb
rails_config-0.1.5 spec/spec_helper.rb
rails_config-0.1.4 spec/spec_helper.rb
rails_config-0.1.3 spec/spec_helper.rb