tddium-preview 0.6.11 → 0.6.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Gemfile.lock +1 -1
- data/lib/tddium/version.rb +1 -1
- data/lib/tddium.rb +7 -0
- data/spec/tddium_spec.rb +8 -1
- metadata +1 -1
data/Gemfile.lock
CHANGED
data/lib/tddium/version.rb
CHANGED
data/lib/tddium.rb
CHANGED
@@ -10,6 +10,7 @@ require "tddium_client"
|
|
10
10
|
require "base64"
|
11
11
|
require 'erb'
|
12
12
|
require File.expand_path("../tddium/constant", __FILE__)
|
13
|
+
require File.expand_path("../tddium/version", __FILE__)
|
13
14
|
require File.expand_path("../tddium/heroku", __FILE__)
|
14
15
|
|
15
16
|
# Usage:
|
@@ -340,6 +341,12 @@ class Tddium < Thor
|
|
340
341
|
end
|
341
342
|
end
|
342
343
|
|
344
|
+
map "-v" => :version
|
345
|
+
desc "version", "Print the tddium gem version"
|
346
|
+
def version
|
347
|
+
say TddiumVersion::VERSION
|
348
|
+
end
|
349
|
+
|
343
350
|
private
|
344
351
|
|
345
352
|
def call_api(method, api_path, params = {}, api_key = nil, show_error = true)
|
data/spec/tddium_spec.rb
CHANGED
@@ -83,7 +83,7 @@ describe Tddium do
|
|
83
83
|
send("run_#{method}", tddium, options)
|
84
84
|
end
|
85
85
|
|
86
|
-
[:suite, :spec, :status, :account, :login, :logout, :password, :heroku].each do |method|
|
86
|
+
[:suite, :spec, :status, :account, :login, :logout, :password, :heroku, :version].each do |method|
|
87
87
|
def prep_params(method, params=nil)
|
88
88
|
options = params.first || {}
|
89
89
|
options[:environment] = "test" unless options.has_key?(:environment)
|
@@ -1597,4 +1597,11 @@ describe Tddium do
|
|
1597
1597
|
it_should_behave_like "an unsuccessful api call"
|
1598
1598
|
end
|
1599
1599
|
end
|
1600
|
+
|
1601
|
+
describe "#version" do
|
1602
|
+
it "should print the version" do
|
1603
|
+
tddium.should_receive(:say).with(TddiumVersion::VERSION)
|
1604
|
+
run_version(tddium)
|
1605
|
+
end
|
1606
|
+
end
|
1600
1607
|
end
|