Sha256: 5cea9f1013d013481b0ca1dc2cbaa3b63f6e98b0d7bfb9d565882b5832b3bdd9
Contents?: true
Size: 1.65 KB
Versions: 5
Compression:
Stored size: 1.65 KB
Contents
$TESTING=true $:.push File.join(File.dirname(__FILE__), '..', 'lib') ENV['HOME'] = File.dirname(__FILE__) require 'rubygems' require 'bundler' Bundler.require(:default, :test) def here Pathname.new(File.dirname(__FILE__)) end def apis here + "apis" end def entries(api) File.read(apis + api + "methods.html") end def classes(api) File.read(apis + api + "classes.html") end include WebMock WebMock.disable_net_connect! stub_request(:get, "http://api.rubyonrails.org/v2.3.8/fr_method_index.html").to_return(:body => entries("rails-2.3.8")) stub_request(:get, "http://api.rubyonrails.org/v2.3.8/fr_class_index.html").to_return(:body => classes("rails-2.3.8")) stub_request(:get, "http://api.rubyonrails.org/fr_method_index.html").to_return(:body => entries("rails-3.0.0")) stub_request(:get, "http://api.rubyonrails.org/fr_class_index.html").to_return(:body => classes("rails-3.0.0")) stub_request(:get, "http://www.ruby-doc.org/core/fr_method_index.html").to_return(:body => entries("1.8")) stub_request(:get, "http://www.ruby-doc.org/core/fr_class_index.html").to_return(:body => classes("1.8")) stub_request(:get, "http://ruby-doc.org/ruby-1.9/fr_method_index.html").to_return(:body => entries("1.9")) stub_request(:get, "http://ruby-doc.org/ruby-1.9/fr_class_index.html").to_return(:body => classes("1.9")) stub_request(:get, "http://faker.rubyforge.org/rdoc//fr_method_index.html").to_return(:body => entries("faker")) stub_request(:get, "http://faker.rubyforge.org/rdoc//fr_class_index.html").to_return(:body => classes("faker")) # Copy over default config. FileUtils.cp(here + "../config/lookup", here + "config") require 'lookup' RSpec.configure do |config| end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
lookup-1.1.1 | spec/spec_helper.rb |
lookup-1.1.0 | spec/spec_helper.rb |
lookup-1.0.0 | spec/spec_helper.rb |
lookup-1.0.0.beta9 | spec/spec_helper.rb |
lookup-1.0.0.beta8 | spec/spec_helper.rb |