spec/spec_helper.rb in pilha-0.1.1 vs spec/spec_helper.rb in pilha-0.1.2

- old
+ new

@@ -12,11 +12,11 @@ ROOT_URL = [StackOverflow::Client::URL.chomp('/'), StackOverflow::Client::API_VERSION].join '/' FakeWeb.allow_net_connect = false def register(options) url = api_method_url(options[:url]) - FakeWeb.register_uri(:get, url, :body => read_fixture(options[:body] + '.json')) + FakeWeb.register_uri(:get, url, :body => read_fixture(options[:body] + '.json.gz')) end def read_fixture(fixture) File.read(File.join(FIXTURES_PATH, fixture)) end @@ -29,5 +29,10 @@ register :url => method + '/', :body => method end register(:url => 'badges/9/', :body => 'badges_by_id') register(:url => 'badges/9/?pagesize=50', :body => 'badges_by_id_page2') +register(:url => 'badges/tags/', :body => 'badges_tag_based') +register(:url => 'answers/666/', :body => 'answers_by_id') +register(:url => 'answers/555/?comments=true', :body => 'answer_with_comments') +register(:url => 'comments/1/', :body => 'comments') +register(:url => 'users/1/answers/', :body => 'users_answers')