test/razsell_test.rb in razsell-0.0.10 vs test/razsell_test.rb in razsell-0.0.11
- old
+ new
@@ -1,9 +1,9 @@
require 'test_helper'
-class RazsellTest < Test::Unit::TestCase
- include Razsell
+class RazsellMixinTest < Test::Unit::TestCase
+ include Razsell::Mixin
context "basic operations" do
setup do
@query = Razsell::Query.new
end
@@ -11,9 +11,25 @@
should "return results" do
http_service = Razsell::HttpService.new
http_service.expects(:get).once.returns("")
result = request @query, :http_service => http_service
+ assert_equal Razsell::Results, result.class
+ end
+ end
+end
+
+class RazsellNonMixinTest < Test::Unit::TestCase
+ context "basic operations" do
+ setup do
+ @query = Razsell::Query.new
+ end
+
+ should "return results" do
+ http_service = Razsell::HttpService.new
+ http_service.expects(:get).once.returns("")
+
+ result = Razsell.request @query, :http_service => http_service
assert_equal Razsell::Results, result.class
end
end
end