Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Using the 1.x mongo driver now requires explicitly setting the driver…
… option
  • Loading branch information
estolfo committed Nov 26, 2015
1 parent ac10793 commit 5f9ce1f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion lib/origin/optional.rb
Expand Up @@ -284,7 +284,7 @@ def without(*args)
#
# @since 1.0.0
def add_sort_option(options, field, direction)
if driver == :mongo
if driver == :mongo1x
sorting = (options[:sort] || []).dup
sorting.push([ field, direction ])
options.store(:sort, sorting)
Expand Down
18 changes: 9 additions & 9 deletions spec/origin/optional_spec.rb
Expand Up @@ -17,7 +17,7 @@

describe "##{method}" do

context "when using the moped driver syntax" do
context "when using the official mongodb driver syntax" do

context "when the query is aggregating" do

Expand Down Expand Up @@ -141,10 +141,10 @@
end
end

context "when using the mongo driver syntax" do
context "when using the mongo-1.x driver syntax" do

let(:query) do
Origin::Query.new({}, {}, :mongo)
Origin::Query.new({}, {}, :mongo1x)
end

context "when provided symbols" do
Expand Down Expand Up @@ -290,7 +290,7 @@

describe "##{method}" do

context "when using the moped driver syntax" do
context "when using the official mongodb driver syntax" do

context "when the query is aggregating" do

Expand Down Expand Up @@ -414,10 +414,10 @@
end
end

context "when using the mongo driver syntax" do
context "when using the mongo-1.x driver syntax" do

let(:query) do
Origin::Query.new({}, {}, :mongo)
Origin::Query.new({}, {}, :mongo1x)
end

context "when provided symbols" do
Expand Down Expand Up @@ -816,7 +816,7 @@

describe "##{method}" do

context "when using the moped driver syntax" do
context "when using the official mongodb driver syntax" do

context "when provided a hash" do

Expand Down Expand Up @@ -1121,10 +1121,10 @@
end
end

context "when using the mongo driver syntax" do
context "when using the mongo-1.x driver syntax" do

let(:query) do
Origin::Query.new({}, {}, :mongo)
Origin::Query.new({}, {}, :mongo1x)
end

context "when provided a hash" do
Expand Down

0 comments on commit 5f9ce1f

Please sign in to comment.