codersdojo 1.2.09 → 1.2.10
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/templates/any/.meta +2 -1
- data/templates/any/README +4 -0
- data/templates/php.phpunit/%kata_file%.php +25 -0
- data/templates/php.phpunit/.meta +3 -0
- data/templates/php.phpunit/README +11 -0
- data/templates/php.phpunit/run-endless.%sh% +1 -0
- data/templates/php.phpunit/run-once.%sh% +1 -0
- metadata +9 -4
data/templates/any/.meta
CHANGED
@@ -1 +1,2 @@
|
|
1
|
-
framework:
|
1
|
+
framework: <language>.<testframework>
|
2
|
+
source_files: .*\.<extension>
|
data/templates/any/README
CHANGED
@@ -5,6 +5,10 @@ These files were created:
|
|
5
5
|
|
6
6
|
run-once.%sh% is not implemented by now. You have to implement it appropriately. The return code of the script has to be 0 if the tests succeeded and another value if the tests failed.
|
7
7
|
|
8
|
+
You have to adapt the .meta file:
|
9
|
+
'framework' consists of two parts, the programming language and the test framework seperated by a dot. A valid framework would be java.junit.
|
10
|
+
'source_files' is a regular expression that match the source files of the kata. A valid source_files definition would be .*\.java for all files ending with .java.
|
11
|
+
|
8
12
|
Run run-endless.%sh% and start your kata. (On Mac/Linux you have to call ./run-endless.%sh%.)
|
9
13
|
|
10
14
|
Assumptions:
|
@@ -0,0 +1,25 @@
|
|
1
|
+
<?php
|
2
|
+
// Adapt the code to your code kata %kata_file%.
|
3
|
+
// Important: Test and production code has to be
|
4
|
+
// completely in this file.
|
5
|
+
|
6
|
+
require_once 'PHPUnit/Autoload.php';
|
7
|
+
|
8
|
+
// Please do not rename the test class. If you change the name, you have to adapt it in run-once.sh.
|
9
|
+
|
10
|
+
class %Kata_file%Test extends PHPUnit_Framework_TestCase
|
11
|
+
{
|
12
|
+
public function testFoo() {
|
13
|
+
$objectUnderTest = new %Kata_file%();
|
14
|
+
$this->assertEquals('foo', $objectUnderTest->foo());
|
15
|
+
}
|
16
|
+
}
|
17
|
+
|
18
|
+
class %Kata_file%
|
19
|
+
{
|
20
|
+
public function foo()
|
21
|
+
{
|
22
|
+
return 'fixme';
|
23
|
+
}
|
24
|
+
}
|
25
|
+
|
@@ -0,0 +1,11 @@
|
|
1
|
+
These files were created:
|
2
|
+
README is what you are currently reading
|
3
|
+
run-once.%sh% runs your tests once
|
4
|
+
run-endless.%sh% runs your tests endlessly via run-once.%sh%
|
5
|
+
|
6
|
+
Run run-endless.%sh% and start your kata. (On Mac/Linux you have to call ./run-endless.%sh%.)
|
7
|
+
|
8
|
+
Assumptions:
|
9
|
+
- The whole kata source code is in the one %kata_file%.php.
|
10
|
+
|
11
|
+
The support for PHP/PHP-Unit was contributed by Gregor Gramlich.
|
@@ -0,0 +1 @@
|
|
1
|
+
codersdojo start run-once.%sh% %kata_file%.php
|
@@ -0,0 +1 @@
|
|
1
|
+
phpunit %Kata_file%Test %kata_file%.php
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: codersdojo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 11
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 1.2.
|
9
|
+
- 10
|
10
|
+
version: 1.2.10
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- CodersDojo-Team
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-05-
|
18
|
+
date: 2011-05-07 00:00:00 +02:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -127,6 +127,10 @@ files:
|
|
127
127
|
- templates/perl.test/README
|
128
128
|
- templates/perl.test/run-endless.sh
|
129
129
|
- templates/perl.test/run-once.sh
|
130
|
+
- templates/php.phpunit/%kata_file%.php
|
131
|
+
- templates/php.phpunit/README
|
132
|
+
- templates/php.phpunit/run-endless.%sh%
|
133
|
+
- templates/php.phpunit/run-once.%sh%
|
130
134
|
- templates/python.pytest/%kata_file%.py
|
131
135
|
- templates/python.pytest/README
|
132
136
|
- templates/python.pytest/run-endless.%sh%
|
@@ -159,6 +163,7 @@ files:
|
|
159
163
|
- templates/javascript.jspec/.meta
|
160
164
|
- templates/javascript.vows/.meta
|
161
165
|
- templates/perl.test/.meta
|
166
|
+
- templates/php.phpunit/.meta
|
162
167
|
- templates/python.pytest/.meta
|
163
168
|
- templates/python.pyunit/.meta
|
164
169
|
- templates/ruby.rspec/.meta
|