Skip to content

Commit

Permalink
Added small spec and Gemfile and support for travis-ci
Browse files Browse the repository at this point in the history
  • Loading branch information
ngiger committed Nov 18, 2013
1 parent de3a21f commit 67d08a7
Show file tree
Hide file tree
Showing 6 changed files with 121 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .gitignore
@@ -0,0 +1,4 @@
.bundle/
vendor/
pkg/
coverage/
21 changes: 21 additions & 0 deletions .travis.yml
@@ -0,0 +1,21 @@
language: ruby
before_install:
- gem install bundler

install:
- bundle install

script:
- rspec spec/currency_spec.rb

notifications:
email:
- ngiger@ywesee.com
rvm:
- ruby-head
- 2.0.0
- 1.9.3
- 1.8.7
matrix:
allow_failures:
- rvm: ruby-head
14 changes: 14 additions & 0 deletions Gemfile
@@ -0,0 +1,14 @@
source "http://rubygems.org"

group :development, :test do
gem 'flexmock'
gem 'rake'
gem 'minitest', '>=5.0.0'
gem 'simplecov'
gem 'rspec'
gem 'hoe'
end

group :development do
gem 'pry-debugger', :platforms => [:ruby_19, :ruby_20]
end
55 changes: 55 additions & 0 deletions Gemfile.lock
@@ -0,0 +1,55 @@
GEM
remote: http://rubygems.org/
specs:
coderay (1.1.0)
columnize (0.3.6)
debugger (1.6.2)
columnize (>= 0.3.1)
debugger-linecache (~> 1.2.0)
debugger-ruby_core_source (~> 1.2.3)
debugger-linecache (1.2.0)
debugger-ruby_core_source (1.2.3)
diff-lcs (1.2.4)
docile (1.1.0)
flexmock (1.3.2)
hoe (3.7.1)
rake (>= 0.8, < 11.0)
lockfile (2.1.0)
method_source (0.8.2)
minitest (5.0.8)
multi_json (1.8.2)
pry (0.9.12.3)
coderay (~> 1.0)
method_source (~> 0.8)
slop (~> 3.4)
pry-debugger (0.2.2)
debugger (~> 1.3)
pry (~> 0.9.10)
rake (10.1.0)
rspec (2.14.1)
rspec-core (~> 2.14.0)
rspec-expectations (~> 2.14.0)
rspec-mocks (~> 2.14.0)
rspec-core (2.14.5)
rspec-expectations (2.14.3)
diff-lcs (>= 1.1.3, < 2.0)
rspec-mocks (2.14.3)
simplecov (0.8.1)
docile (~> 1.1.0)
lockfile (>= 2.1.0)
multi_json
simplecov-html (~> 0.8.0)
simplecov-html (0.8.0)
slop (3.4.7)

PLATFORMS
ruby

DEPENDENCIES
flexmock
hoe
minitest (>= 5.0.0)
pry-debugger
rake
rspec
simplecov
14 changes: 14 additions & 0 deletions spec/currency_spec.rb
@@ -0,0 +1,14 @@
# encoding: utf-8
$: << File.dirname(__FILE__)
require 'spec_helper'
require 'currency'
require 'rspec'

describe Currency do
it 'should read from a manifest' do
rate = Currency.rate('CHF', 'EUR')
rate.class.should eql Float
rate.should < 1.0
rate.should > 0.5
end
end
13 changes: 13 additions & 0 deletions spec/spec_helper.rb
@@ -0,0 +1,13 @@
# This file was generated by the `rspec --init` command. Conventionally, all
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
# Require this file using `require "spec_helper"` to ensure that it is only
# loaded once.
#
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
#
$:.unshift File.join(File.dirname(__FILE__), '..', 'lib')
$:.unshift File.dirname(__FILE__)

require 'bundler/setup'
Bundler.require

0 comments on commit 67d08a7

Please sign in to comment.