Sha256: f9c283e3a41551fa1d5f7e2fcfc199c3fe00c40b49b05229a4957363935dbe43

Contents?: true

Size: 1.21 KB

Versions: 5

Compression:

Stored size: 1.21 KB

Contents

require 'simplecov'
SimpleCov.start

require 'coveralls'
Coveralls.wear!


require 'httpclient'

require 'mocha/api'
require 'webmock/rspec'
require 'timecop'

spec_helper = Pathname.new(__FILE__).realpath
lib_path  = File.expand_path("../../lib", spec_helper)
$:.unshift(lib_path)

##############################################################
# Configure rspec

RSpec.configure do |config|
  config.order = "random"

  config.after(:each) do
    Timecop.return # make sure timecop is disabled after each test
  end

  config.treat_symbols_as_metadata_keys_with_true_values = true
  config.filter_run :focus => true
  config.run_all_when_everything_filtered = true

  unless config.inclusion_filter[:integration]
    p "Integration specs are DISABLED. To run integration specs only, use `rspec --tag integration`"
    config.filter_run_excluding :integration => true
  else
    p "Running integrtion specs ONLY."
  end

end

# END
##############################################################
$ROOT = File.expand_path("../", lib_path)

Dir.glob(File.join(lib_path, '/**/*.rb')).each do |file|
  require file
end

# helper methods for easier testing
def load_fixture(filename)
  File.read(File.join($ROOT, "spec/fixtures/#{filename}"))
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
ns-yapi-0.5.0 spec/spec_helper.rb
ns-yapi-0.4.4 spec/spec_helper.rb
ns-yapi-0.4.3 spec/spec_helper.rb
ns-yapi-0.4.2 spec/spec_helper.rb
ns-yapi-0.4.1 spec/spec_helper.rb