summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDickson S. Guedes2011-05-06 04:42:43 +0000
committerDickson S. Guedes2011-05-06 04:42:43 +0000
commit21aa27bb259f1e8977c5840e693a17a52ecef74a (patch)
tree1595f3199a76c7199c9f3732d478422cccfa1d5d
parenta9a9d79cc7471b89bf1e4a8147426896726d664e (diff)
added initial specs all pending at moment
-rw-r--r--Rakefile12
-rw-r--r--lib/pgxn_utils.rb2
-rw-r--r--lib/pgxn_utils/cli.rb5
-rw-r--r--spec/new_extension_spec.rb24
-rw-r--r--spec/spec_helper.rb5
5 files changed, 47 insertions, 1 deletions
diff --git a/Rakefile b/Rakefile
index 14cfe0b..732bec3 100644
--- a/Rakefile
+++ b/Rakefile
@@ -1,2 +1,14 @@
require 'bundler'
Bundler::GemHelper.install_tasks
+
+require 'rspec/core/rake_task'
+
+desc "Run RSpec"
+RSpec::Core::RakeTask.new do |t|
+ t.verbose = false
+ t.rspec_opts = %w(-fs --color)
+ #dont show warnings here yet
+ #t.ruby_opts = %w(-w)
+end
+
+task :default => :spec
diff --git a/lib/pgxn_utils.rb b/lib/pgxn_utils.rb
index 9042452..57b3977 100644
--- a/lib/pgxn_utils.rb
+++ b/lib/pgxn_utils.rb
@@ -1,3 +1,3 @@
module PgxnUtils
- # Your code goes here...
+ autoload :CLI, 'pgxn_utils/cli'
end
diff --git a/lib/pgxn_utils/cli.rb b/lib/pgxn_utils/cli.rb
new file mode 100644
index 0000000..064b651
--- /dev/null
+++ b/lib/pgxn_utils/cli.rb
@@ -0,0 +1,5 @@
+module PgxnUtils
+ class CLI
+
+ end
+end
diff --git a/spec/new_extension_spec.rb b/spec/new_extension_spec.rb
new file mode 100644
index 0000000..7e010b9
--- /dev/null
+++ b/spec/new_extension_spec.rb
@@ -0,0 +1,24 @@
+require File.expand_path('spec/spec_helper')
+
+describe PgxnUtils::CLI do
+ context "create extension" do
+ it "should generates an skeleton"
+ it "should generates a test skeleton"
+ it "should accepts name and email as comand line"
+ it "should accepts short and long description as command line"
+ end
+
+ context "tests" do
+ it "should run tests and returns correct results"
+ end
+
+ context "invoke external tasks" do
+ it "should execute sucessfuly"
+ it "should ignores non-existant external tasks"
+ end
+
+ context "manage extension" do
+ it "should update and tag version"
+ it "should upload to pgxn.org"
+ end
+end
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
new file mode 100644
index 0000000..ca31bc0
--- /dev/null
+++ b/spec/spec_helper.rb
@@ -0,0 +1,5 @@
+$:.unshift File.expand_path('..', __FILE__)
+$:.unshift File.expand_path('../../lib', __FILE__)
+
+require 'rspec'
+require 'pgxn_utils'