$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) $LOAD_PATH.unshift(File.dirname(__FILE__)) require 'rspec' require 'trip_advisor' require 'webmock/rspec' require 'tempfile' # Requires supporting files with custom matchers and macros, etc, # in ./support/ and its subdirectories. Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f } module FixtureHelper def root_path File.expand_path(File.join(File.dirname(__FILE__), 'fixtures')) end def fixture_path(fixture) File.join(root_path, fixture) end def fixture_content(fixture) File.read(fixture_path(fixture)) end end RSpec.configure do |config| config.include(FixtureHelper) end