Permalink
Browse files

Added Gemfile and development dependencies, to test gem

Now you can use

  bundle install ; rake

to test the gem.

You can use both rspec version 1 or 2
  • Loading branch information...
1 parent dae1268 commit 424588f883d2e2e002413ffd31148a194656c801 Gaizka Villate committed Jul 23, 2011
Showing with 25 additions and 8 deletions.
  1. +3 −0 Gemfile
  2. +20 −8 Rakefile
  3. +2 −0 mogli.gemspec
View
@@ -0,0 +1,3 @@
+source "http://www.rubygems.org"
+
+gemspec
View
@@ -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
+
View
@@ -10,4 +10,6 @@ spec = Gem::Specification.new do |s|
s.email = "mmangino@elevatedrails.com"
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.