capistrano-spec 0.3.1 → 0.3.2
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/.travis.yml +5 -0
- data/README.rdoc +2 -0
- data/Rakefile +1 -1
- data/capistrano-spec.gemspec +3 -2
- data/spec/capistrano-spec_spec.rb +3 -3
- data/spec/recipe/fakerecipe.rb +1 -1
- data/spec/stub_commands_spec.rb +3 -3
- metadata +3 -2
data/.travis.yml
ADDED
data/README.rdoc
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
= capistrano-spec
|
2
2
|
|
3
|
+
{<img src="https://travis-ci.org/technicalpickles/capistrano-spec.png?branch=master" alt="Build Status" />}[https://travis-ci.org/technicalpickles/capistrano-spec]
|
4
|
+
|
3
5
|
Capistrano... the final frontier of testing... well, maybe not final, but it is a frontier. I had set out to do some bug fixing and some BDDing on some of my capistrano code, but found it wasn't really obvious how to do so. As a result, I set out to write capistrano-spec and document how to test capistrano libraries.
|
4
6
|
|
5
7
|
== Install
|
data/Rakefile
CHANGED
data/capistrano-spec.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "capistrano-spec"
|
8
|
-
s.version = "0.3.
|
8
|
+
s.version = "0.3.2"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Joshua Nichols", "Karl Matthias", "Peter M Souter", "Jan Graichen"]
|
12
|
-
s.date = "2013-04-
|
12
|
+
s.date = "2013-04-14"
|
13
13
|
s.description = "Helpers and matchers for testing capistrano"
|
14
14
|
s.email = "josh@technicalpickles.com"
|
15
15
|
s.extra_rdoc_files = [
|
@@ -18,6 +18,7 @@ Gem::Specification.new do |s|
|
|
18
18
|
]
|
19
19
|
s.files = [
|
20
20
|
".document",
|
21
|
+
".travis.yml",
|
21
22
|
"Gemfile",
|
22
23
|
"Gemfile.lock",
|
23
24
|
"LICENSE",
|
@@ -1,15 +1,15 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
require 'capistrano'
|
3
3
|
|
4
|
-
|
4
|
+
require File.expand_path('../recipe/fakerecipe', __FILE__)
|
5
5
|
|
6
6
|
describe Capistrano::Spec do
|
7
7
|
|
8
8
|
before do
|
9
9
|
@configuration = Capistrano::Configuration.new
|
10
10
|
@configuration.extend(Capistrano::Spec::ConfigurationExtension)
|
11
|
-
@configuration.extend(Capistrano::
|
12
|
-
Capistrano::
|
11
|
+
@configuration.extend(Capistrano::Fakerecipe)
|
12
|
+
Capistrano::Fakerecipe.load_into(@configuration)
|
13
13
|
end
|
14
14
|
|
15
15
|
describe Capistrano::Spec::Matchers do
|
data/spec/recipe/fakerecipe.rb
CHANGED
data/spec/stub_commands_spec.rb
CHANGED
@@ -53,7 +53,7 @@ describe 'Command stubbing' do
|
|
53
53
|
end
|
54
54
|
|
55
55
|
it 'should allow to stub command processing' do
|
56
|
-
@configuration.stub_command 'pwd', with
|
56
|
+
@configuration.stub_command 'pwd', :with => proc { |cmd| cmd }
|
57
57
|
@configuration.remote_pwd.should == 'pwd'
|
58
58
|
end
|
59
59
|
|
@@ -65,12 +65,12 @@ describe 'Command stubbing' do
|
|
65
65
|
end
|
66
66
|
|
67
67
|
it 'should allow to stub command processing with error' do
|
68
|
-
@configuration.stub_command 'pwd', raise
|
68
|
+
@configuration.stub_command 'pwd', :raise => ::Capistrano::CommandError
|
69
69
|
expect { @configuration.no_block }.to raise_error(::Capistrano::CommandError)
|
70
70
|
end
|
71
71
|
|
72
72
|
it 'should allow to stub command processing with CommandError' do
|
73
|
-
@configuration.stub_command 'pwd', fail
|
73
|
+
@configuration.stub_command 'pwd', :fail => true
|
74
74
|
expect { @configuration.no_block }.to raise_error(::Capistrano::CommandError)
|
75
75
|
end
|
76
76
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano-spec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date: 2013-04-
|
15
|
+
date: 2013-04-14 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: rspec
|
@@ -39,6 +39,7 @@ extra_rdoc_files:
|
|
39
39
|
- README.rdoc
|
40
40
|
files:
|
41
41
|
- .document
|
42
|
+
- .travis.yml
|
42
43
|
- Gemfile
|
43
44
|
- Gemfile.lock
|
44
45
|
- LICENSE
|