falsework 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,47 @@
1
+ require_relative 'helper'
2
+
3
+ class TestFalsework < MiniTest::Unit::TestCase
4
+ CMD = cmd('falsework') # get path to the exe & cd to tests directory
5
+
6
+ def setup
7
+ # this runs every time before test_*
8
+ end
9
+
10
+ def test_project_list
11
+ r = cmd_run "#{CMD} list"
12
+ assert_equal(0, r[0])
13
+ assert_match(/naive\n/, r[2])
14
+ end
15
+
16
+ def test_project_new
17
+ rm_rf 'templates/foo'
18
+ r = cmd_run "#{CMD} new templates/foo -v"
19
+ # pp r
20
+ assert_equal(0, r[0], r)
21
+
22
+ # check for first & last lines only
23
+ out = r[2].split("\n")
24
+ assert_match(/^Project path: \//, out.first)
25
+ assert_equal("L: README.rdoc => doc/README.rdoc", out.last)
26
+
27
+ # add files
28
+ origdir = pwd
29
+ cd 'templates/foo'
30
+
31
+ r = cmd_run "../../#{CMD} exe qqq"
32
+ assert_equal(0, r[0])
33
+ assert_equal(true, File.executable?('bin/qqq'))
34
+
35
+ r = cmd_run "../../#{CMD} test qqq"
36
+ assert_equal(0, r[0])
37
+ assert_equal(true, File.exist?('test/test_qqq.rb'))
38
+
39
+ cd origdir
40
+ end
41
+
42
+ def test_project_invalid_name
43
+ r = cmd_run "#{CMD} new 123"
44
+ assert_equal(1, r[0])
45
+ assert_match(/project name cannot start with a digit/, r[1])
46
+ end
47
+ end
metadata ADDED
@@ -0,0 +1,122 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: falsework
3
+ version: !ruby/object:Gem::Version
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 0
8
+ - 1
9
+ version: 0.0.1
10
+ platform: ruby
11
+ authors:
12
+ - Alexander Gromnitsky
13
+ autorequire:
14
+ bindir: bin
15
+ cert_chain: []
16
+
17
+ date: 2010-12-22 00:00:00 +02:00
18
+ default_executable: falsework
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
21
+ name: git
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
24
+ none: false
25
+ requirements:
26
+ - - ">="
27
+ - !ruby/object:Gem::Version
28
+ segments:
29
+ - 1
30
+ - 2
31
+ - 5
32
+ version: 1.2.5
33
+ type: :runtime
34
+ version_requirements: *id001
35
+ - !ruby/object:Gem::Dependency
36
+ name: open4
37
+ prerelease: false
38
+ requirement: &id002 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ segments:
44
+ - 1
45
+ - 0
46
+ - 1
47
+ version: 1.0.1
48
+ type: :runtime
49
+ version_requirements: *id002
50
+ description:
51
+ email: alexander.gromnitsky@gmail.com
52
+ executables:
53
+ - falsework
54
+ extensions: []
55
+
56
+ extra_rdoc_files:
57
+ - doc/LICENSE
58
+ - doc/README.rdoc
59
+ - doc/TODO.rdoc
60
+ files:
61
+ - bin/falsework
62
+ - doc/LICENSE
63
+ - doc/README.rdoc
64
+ - doc/TODO.rdoc
65
+ - etc/falsework.yaml
66
+ - Rakefile
67
+ - README.rdoc
68
+ - test/helper.rb
69
+ - test/test_utils.rb
70
+ - test/find_erb_templates.rb
71
+ - test/templates/.keep_me
72
+ - lib/falsework/meta.rb
73
+ - lib/falsework/utils.rb
74
+ - lib/falsework/templates/naive/doc/LICENSE.erb
75
+ - lib/falsework/templates/naive/doc/README.rdoc.erb
76
+ - lib/falsework/templates/naive/Rakefile.erb
77
+ - lib/falsework/templates/naive/test/helper.rb.erb
78
+ - lib/falsework/templates/naive/test/test_.@project..rb.erb
79
+ - lib/falsework/templates/naive/lib/.@project./utils.rb.erb
80
+ - lib/falsework/templates/naive/lib/.@project./meta.rb.erb
81
+ - lib/falsework/templates/naive/etc/.@project..yaml.erb
82
+ - lib/falsework/templates/naive/bin/.@project..erb
83
+ - lib/falsework/templates/naive/README.rdoc.erb
84
+ - lib/falsework/templates/naive/.gitignore.erb
85
+ - lib/falsework/mould.rb
86
+ has_rdoc: true
87
+ homepage: http://github.com/gromnitsky/falsework
88
+ licenses: []
89
+
90
+ post_install_message:
91
+ rdoc_options:
92
+ - -m
93
+ - doc/README.rdoc
94
+ require_paths:
95
+ - lib
96
+ required_ruby_version: !ruby/object:Gem::Requirement
97
+ none: false
98
+ requirements:
99
+ - - ">="
100
+ - !ruby/object:Gem::Version
101
+ segments:
102
+ - 1
103
+ - 9
104
+ - 2
105
+ version: 1.9.2
106
+ required_rubygems_version: !ruby/object:Gem::Requirement
107
+ none: false
108
+ requirements:
109
+ - - ">="
110
+ - !ruby/object:Gem::Version
111
+ segments:
112
+ - 0
113
+ version: "0"
114
+ requirements: []
115
+
116
+ rubyforge_project:
117
+ rubygems_version: 1.3.7
118
+ signing_key:
119
+ specification_version: 3
120
+ summary: A primitive scaffold generator for writing CLI programs in Ruby.
121
+ test_files:
122
+ - test/test_utils.rb