kosher 0.2.3 → 0.2.4

Sign up to get free protection for your applications and to get access to all the features.
data/lib/kosher/offer.rb CHANGED
@@ -4,7 +4,7 @@ module Kosher
4
4
 
5
5
  def <=>(other)
6
6
  if self.kosher? != other.kosher?
7
- self.kosher? ? 1 : -1
7
+ self.kosher? ? -1 : 1
8
8
  else
9
9
  currency = base_currency
10
10
  self.price.exchange_to(currency) <=> other.price.exchange_to(currency)
@@ -1,3 +1,3 @@
1
1
  module Kosher
2
- VERSION = '0.2.3'
2
+ VERSION = '0.2.4'
3
3
  end
@@ -86,9 +86,9 @@ module Kosher
86
86
  @offer.stub!(:kosher?).and_return(true)
87
87
  end
88
88
 
89
- it "is greater than a non-kosher offer" do
89
+ it "is less than a non-kosher offer" do
90
90
  @another_offer.stub!(:kosher?).and_return(false)
91
- @offer.should be > @another_offer
91
+ @offer.should < @another_offer
92
92
  end
93
93
 
94
94
  context "when the other offer is kosher as well" do
@@ -103,7 +103,7 @@ module Kosher
103
103
  end
104
104
 
105
105
  it "is less than other offer" do
106
- @offer.should be < @another_offer
106
+ @offer.should < @another_offer
107
107
  end
108
108
  end
109
109
 
@@ -123,7 +123,7 @@ module Kosher
123
123
  end
124
124
 
125
125
  it "is greater than the other offer" do
126
- @offer.should be > @another_offer
126
+ @offer.should > @another_offer
127
127
  end
128
128
  end
129
129
  end
@@ -134,9 +134,9 @@ module Kosher
134
134
  @offer.stub!(:kosher?).and_return(false)
135
135
  end
136
136
 
137
- it "is less than a kosher offer" do
137
+ it "is greater than a kosher offer" do
138
138
  @another_offer.stub!(:kosher?).and_return(true)
139
- @offer.should be < @another_offer
139
+ @offer.should > @another_offer
140
140
  end
141
141
 
142
142
  context "when the other offer is not kosher either" do
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: kosher
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.2.3
5
+ version: 0.2.4
6
6
  platform: ruby
7
7
  authors:
8
8
  - Paper Cavalier