spec/spec_helper.rb in pilha-0.1.9 vs spec/spec_helper.rb in pilha-0.2.0
- old
+ new
@@ -2,11 +2,11 @@
$LOAD_PATH.unshift(path) unless $LOAD_PATH.include?(path)
require 'rubygems'
require 'fakeweb'
require 'pilha'
-require 'spec'
+require 'rspec'
require 'pp'
include StackExchange
StackExchange::StackOverflow::Client.config
FIXTURES_PATH = File.expand_path(File.join(File.dirname(__FILE__), 'fixtures'))
@@ -24,17 +24,18 @@
def api_method_url(method)
ROOT_URL + '/' + method
end
-['stats', 'badges' ].each do |method|
+['stats', 'badges', 'questions'].each do |method|
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/666/', :body => 'answer_by_id')
+register(:url => 'answers/666/?body=true', :body => 'answer_by_id_with_body')
register(:url => 'answers/555/', :body => 'answer_with_comments')
register(:url => 'comments/1/', :body => 'comments')
register(:url => 'questions/549/answers/', :body => 'answers_by_question_id')
register(:url => 'questions/549/comments/', :body => 'comments_by_question_id')
register(:url => 'users/333/questions/', :body => 'questions_by_user_id')