kosher 0.2.1 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/lib/kosher/offer.rb CHANGED
@@ -7,7 +7,7 @@ module Kosher
7
7
  self.kosher? ? 1 : -1
8
8
  else
9
9
  currency = base_currency
10
- -(self.price.exchange_to(currency) <=> other.price.exchange_to(currency))
10
+ self.price.exchange_to(currency) <=> other.price.exchange_to(currency)
11
11
  end
12
12
  end
13
13
 
@@ -1,3 +1,3 @@
1
1
  module Kosher
2
- VERSION = '0.2.1'
2
+ VERSION = '0.2.2'
3
3
  end
@@ -102,8 +102,8 @@ module Kosher
102
102
  @another_offer.stub!(:price).and_return(Money.new(150, 'EUR'))
103
103
  end
104
104
 
105
- it "is greater than other offer" do
106
- @offer.should be > @another_offer
105
+ it "is less than other offer" do
106
+ @offer.should be < @another_offer
107
107
  end
108
108
  end
109
109
 
@@ -122,8 +122,8 @@ module Kosher
122
122
  @another_offer.stub!(:price).and_return(Money.new(50, 'EUR'))
123
123
  end
124
124
 
125
- it "is less than the other offer" do
126
- @offer.should be < @another_offer
125
+ it "is greater than the other offer" do
126
+ @offer.should be > @another_offer
127
127
  end
128
128
  end
129
129
  end
@@ -145,13 +145,13 @@ module Kosher
145
145
  @another_offer.stub!(:kosher?).and_return(false)
146
146
  end
147
147
 
148
- context "when it has a higher price" do
148
+ context "when it has a lower price" do
149
149
  before do
150
150
  @another_offer.stub!(:price).and_return(Money.new(150, 'EUR'))
151
151
  end
152
152
 
153
- it "is greater than the other offer" do
154
- @offer.should > @another_offer
153
+ it "is less than the other offer" do
154
+ @offer.should < @another_offer
155
155
  end
156
156
  end
157
157
 
@@ -165,13 +165,13 @@ module Kosher
165
165
  end
166
166
  end
167
167
 
168
- context "when it has a lower price" do
168
+ context "when it has a higher price" do
169
169
  before do
170
170
  @another_offer.stub!(:price).and_return(Money.new(50, 'EUR'))
171
171
  end
172
172
 
173
- it "is less than the other offer" do
174
- @offer.should < @another_offer
173
+ it "is greater than the other offer" do
174
+ @offer.should > @another_offer
175
175
  end
176
176
  end
177
177
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: kosher
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.2.1
5
+ version: 0.2.2
6
6
  platform: ruby
7
7
  authors:
8
8
  - Paper Cavalier