Sha256: c77a098112ab2370b87fce29ff0d155852f2628b220378856076b8eeaa6a269b
Contents?: true
Size: 1.61 KB
Versions: 3
Compression:
Stored size: 1.61 KB
Contents
require 'rubygems' require 'bundler/setup' Bundler.setup require 'rspec' require 'webmock/rspec' require 'time' # figure out where we are being loaded from if $LOADED_FEATURES.grep(/spec\/spec_helper\.rb/).any? begin raise "foo" rescue => e puts <<-MSG =================================================== It looks like spec_helper.rb has been loaded multiple times. Normalize the require to: require "spec/spec_helper" Things like File.join and File.expand_path will cause it to be loaded multiple times. Loaded this time from: #{e.backtrace.join("\n ")} =================================================== MSG end end if !defined?(JRUBY_VERSION) if ENV["COVERAGE"] == "on" require 'simplecov' SimpleCov.start do add_filter "/spec/" add_filter "/lib/xively-rb.rb" add_filter "/vendor/" minimum_coverage 100 end end end #Dir['./spec/support/**/*.rb'].map {|f| require f} $:.push File.expand_path("../lib", __FILE__) require 'xively-rb-connector' #require File.dirname(__FILE__) + '/fixtures/models.rb' RSpec.configure do |config| config.color_enabled = true config.formatter = 'documentation' config.run_all_when_everything_filtered = true # Webmock config.before(:each) do stub_request(:get, "https://api.xively.com/v2/feeds/000000001.json"). with(:headers => {'User-Agent'=>'xively-rb/0.2.10', 'X-Apikey'=>'abcdefg'}). to_return(:status => 200, :body => File.open(File.dirname(__FILE__) + '/support/fixtures/feed_100000000.json').read, :headers => {}) end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
xively-rb-connector-0.1.4 | spec/spec_helper.rb |
xively-rb-connector-0.1.3 | spec/spec_helper.rb |
xively-rb-connector-0.1.2 | spec/spec_helper.rb |