beatport 0.1.6 → 0.1.7

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.
@@ -0,0 +1,31 @@
1
+ require 'spec_helper'
2
+
3
+ module Beatport
4
+ describe Price do
5
+ subject :price do
6
+ Price.new({"code" => "usd", "symbol" => "$", "value" => 1490})
7
+ end
8
+
9
+ describe 'defaults' do
10
+ it "should have the same rounding_mode" do
11
+ Price.rounding_mode.should eq(Money.rounding_mode)
12
+ end
13
+
14
+ it "should have the same precision" do
15
+ Price.conversion_precision.should eq(Money.conversion_precision)
16
+ end
17
+
18
+ end
19
+
20
+ describe '#to_s' do
21
+ it "can be converted to a string" do
22
+ price.to_s.should eq('14.90')
23
+ end
24
+
25
+ it "is equivalent to a given money object" do
26
+ price.to_s.should eq(Money.new(1490, 'usd').to_s)
27
+ end
28
+ end
29
+ end
30
+ end
31
+
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beatport
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-11-11 00:00:00.000000000 Z
12
+ date: 2012-12-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: httparty
@@ -161,14 +161,14 @@ executables: []
161
161
  extensions: []
162
162
  extra_rdoc_files:
163
163
  - LICENSE.txt
164
- - README.rdoc
164
+ - README.md
165
165
  files:
166
166
  - .document
167
167
  - .rspec
168
168
  - Gemfile
169
169
  - Gemfile.lock
170
170
  - LICENSE.txt
171
- - README.rdoc
171
+ - README.md
172
172
  - Rakefile
173
173
  - VERSION
174
174
  - beatport.gemspec
@@ -250,6 +250,7 @@ files:
250
250
  - spec/fixtures/source_type.yml
251
251
  - spec/fixtures/track.yml
252
252
  - spec/item_spec.rb
253
+ - spec/price_spec.rb
253
254
  - spec/spec_helper.rb
254
255
  - spec/support/inflector_spec.rb
255
256
  - spec/support/query_builder_spec.rb
@@ -268,7 +269,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
268
269
  version: '0'
269
270
  segments:
270
271
  - 0
271
- hash: -1268005464569435059
272
+ hash: -1393460495433382922
272
273
  required_rubygems_version: !ruby/object:Gem::Requirement
273
274
  none: false
274
275
  requirements:
@@ -277,7 +278,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
277
278
  version: '0'
278
279
  requirements: []
279
280
  rubyforge_project:
280
- rubygems_version: 1.8.24
281
+ rubygems_version: 1.8.23
281
282
  signing_key:
282
283
  specification_version: 3
283
284
  summary: ruby gem for accessing the beatport api