Permalink
Browse files

modify

  • Loading branch information...
1 parent b880746 commit 616c6eb81ac2227e076c3f350cf4779e5bc7ed08 @ZhangHanDong committed Oct 26, 2010
Showing with 21 additions and 5 deletions.
  1. +5 −5 ruby_extend.gemspec
  2. +16 −0 spec/hash_spec.rb
View
@@ -1,20 +1,20 @@
# -*- encoding: utf-8 -*-
-require File.expand_path("../lib/ruby_extend/version", __FILE__)
Gem::Specification.new do |s|
s.name = "ruby_extend"
- s.version = RubyExtend::VERSION
+ s.version = "0.1"
s.platform = Gem::Platform::RUBY
- s.authors = []
- s.email = []
+ s.authors = ["blackanger"]
+ s.email = ["blackanger.z@gmail.com"]
s.homepage = "http://rubygems.org/gems/ruby_extend"
s.summary = "TODO: Write a gem summary"
- s.description = "TODO: Write a gem description"
+ s.description = "Ruby Extendsions"
s.required_rubygems_version = ">= 1.3.6"
s.rubyforge_project = "ruby_extend"
s.add_development_dependency "bundler", ">= 1.0.0"
+ s.add_development_dependency "rspec"
s.files = `git ls-files`.split("\n")
s.executables = `git ls-files`.split("\n").map{|f| f =~ /^bin\/(.*)/ ? $1 : nil}.compact
View
@@ -0,0 +1,16 @@
+
+
+describe "RubyExtend#hash_reverse" do
+ before(:each) do
+ @hash1 = {:a => 1, :b => 2}
+ end
+
+ it "A hash data should not be reversed if havn't use ruby_extend gem" do
+ @hash1.respond_to?("hash_reverse").should eql false
+ end
+
+ it "A hash data should be reversed" do
+ require 'ruby_extend'
+ @hash1.hash_reverse.should eql({1=>:a, 2=>:b} )
+ end
+end

0 comments on commit 616c6eb

Please sign in to comment.