Skip to content

Commit 73b023e

Browse files
committed
Add a test and other adminy stuff. [admin]
1 parent c055ea1 commit 73b023e

7 files changed

Lines changed: 107 additions & 1 deletion

File tree

.test

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/usr/bin/env ruby
2+
3+
require 'ae'
4+
require 'citron'
5+
6+
$:.unshift('./test')
7+
8+
# Default test run.
9+
Test.run do |r|
10+
r.files << 'test'
11+
end
12+
13+
# Generate SimpleCov coverage report.
14+
# Albeit, it probably won't do this project much good.
15+
Test.run :cov do |r|
16+
r.files << 'test'
17+
require 'simplecov'
18+
SimpleCov.start do
19+
coverage_dir 'log/coverage'
20+
add_filter "/test/"
21+
end
22+
end
23+

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
script: "bundle exec ruby-test -Ilib -Itest test_*.rb"
2+
script: "bundle exec rubytest"
33
rvm:
44
- 1.8.7
55
- 1.9.2

Assembly

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
gem:
3+
active: true
4+
5+
github:
6+
gh_pages: web
7+
8+
email:
9+
mailto:
10+
- ruby-talk@ruby-lang.org
11+
- rubyworks-mailinglist@googlegroups.com
12+
13+
locat:
14+
output: log/locat.html
15+
active: false
16+
17+
vclog:
18+
output:
19+
- log/changes.html
20+
- log/history.html
21+
active: false
22+
23+
24+
# TODO: Use rubytest tool when ready
25+
#lemon:
26+
# tool : Custom
27+
# track : main
28+
# test: |
29+
# sh 'ruby-test test'
30+
# active: false
31+

HISTORY.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# RELEASE HISTORY
2+
3+
## 0.1.0 / 2011-12-23
4+
5+
Initial and quite hopefully the only release ever needed.
6+
7+
Changes:
8+
9+
* Spun project off from Ruby Facets.
10+

NOTICE.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
Main Like Module
2+
3+
Copyright (c) 2011 Rubyworks. All rights reserved.
4+
5+
Redistribution and use in source and binary forms, with or without modification, are
6+
permitted provided that the following conditions are met:
7+
8+
1. Redistributions of source code must retain the above copyright notice, this list of
9+
conditions and the following disclaimer.
10+
11+
2. Redistributions in binary form must reproduce the above copyright notice, this list
12+
of conditions and the following disclaimer in the documentation and/or other materials
13+
provided with the distribution.
14+
15+
THIS SOFTWARE IS PROVIDED BY Rubyworks ``AS IS'' AND ANY EXPRESS OR IMPLIED
16+
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
17+
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL Rubyworks OR
18+
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
19+
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
20+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
21+
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
22+
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
23+
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24+

test/case_main_like_module.rb

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
require 'helper'
2+
3+
testcase "Main Like Module" do
4+
5+
test :define_method do
6+
eval <<-END, TOPLEVEL_BINDING
7+
define_method(:just_some_method) do
8+
'just some method'
9+
end
10+
END
11+
just_some_method.assert == 'just some method'
12+
end
13+
14+
end

test/helper.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
require 'ae'
2+
require 'citron'
3+
4+
require 'main_like_module'

0 commit comments

Comments
 (0)