Skip to content

Commit

Permalink
Added Gemfile and development dependencies, to test gem
Browse files Browse the repository at this point in the history
Now you can use

  bundle install ; rake

to test the gem.

You can use both rspec version 1 or 2
  • Loading branch information
Gaizka Villate committed Jul 27, 2011
1 parent dae1268 commit 424588f
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 8 deletions.
3 changes: 3 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source "http://www.rubygems.org"

gemspec
28 changes: 20 additions & 8 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,25 @@
require 'rake'
require 'rubygems'
gem 'rspec'
require 'spec/rake/spectask'

require 'spec'

desc 'Default: run unit tests.'
task :default => :spec

desc 'Test the plugin.'
Spec::Rake::SpecTask.new(:spec) do |t|
t.libs << 'lib'
t.verbose = true

# So it can we used for both versions of rspec
if Spec::VERSION::MAJOR <= 1
require 'spec/rake/spectask'

desc 'Test the plugin.'
Spec::Rake::SpecTask.new(:spec) do |t|
t.libs << 'lib'
t.verbose = true
end
else
require 'rspec/core/rake_task'
desc 'Test the plugin.'
RSpec::Core::RakeTask.new(:spec) do |t|
t.libs << 'lib'
t.verbose = true
end
end

2 changes: 2 additions & 0 deletions mogli.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,6 @@ spec = Gem::Specification.new do |s|
s.email = "[email protected]"
s.homepage = "http://developers.facebook.com/docs/api"
s.add_dependency('httparty', ">=0.4.3")
s.add_dependency('hashie', "~> 1.0.0")
s.add_development_dependency "rspec"
end

0 comments on commit 424588f

Please sign in to comment.