Sha256: 226843a7342ea5c47eaa4d64ea2e2e56542cc3c2e996e61a4cfa2e0cdbcfb945

Contents?: true

Size: 843 Bytes

Versions: 1

Compression:

Stored size: 843 Bytes

Contents

require 'test_helper'

class RazsellMixinTest < Test::Unit::TestCase
  include Razsell::Mixin

  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 = 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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
razsell-0.0.11 test/razsell_test.rb