factorial 0.0.0 → 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/bin/factorial ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'factorial'
4
+
5
+
6
+ factorial = Factorial::Base.new(ARGV[0])
7
+
8
+ puts factorial.factorial_result
@@ -0,0 +1,13 @@
1
+ require 'spec_helper'
2
+
3
+ describe Factorial::Base do
4
+ it "checking the factorial" do
5
+ fact = Factorial::Base.new(5)
6
+ fact.factorial_result.first.should == 120
7
+ end
8
+
9
+ it "checking the factorial of zero" do
10
+ fact = Factorial::Base.new(0)
11
+ fact.factorial_result.first.should == 1
12
+ end
13
+ end
@@ -0,0 +1,6 @@
1
+ require 'rubygems'
2
+ require 'factorial'
3
+
4
+ RSpec.configure do |config|
5
+ # some (optional) config here
6
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: factorial
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.0
4
+ version: 0.0.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -12,13 +12,17 @@ cert_chain: []
12
12
  date: 2012-02-23 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: it will calculate the factorial of the number
15
- email:
16
- executables: []
15
+ email: santattech@gmail.com
16
+ executables:
17
+ - factorial
17
18
  extensions: []
18
19
  extra_rdoc_files: []
19
20
  files:
20
21
  - lib/factorial.rb
21
22
  - lib/factorial/result.rb
23
+ - spec/spec_helper.rb
24
+ - spec/factorial_spec.rb
25
+ - bin/factorial
22
26
  homepage:
23
27
  licenses: []
24
28
  post_install_message: