Permalink
Browse files

start move to rubydoctest.

  • Loading branch information...
1 parent 4e4f727 commit 85d6cce3300a79af388d70e6aabe44ca2cdf126b @herbdaily committed Nov 24, 2011
Showing with 27 additions and 6 deletions.
  1. +3 −0 Rakefile
  2. +2 −5 TODO
  3. +1 −1 lib/marley/reggae.rb
  4. +21 −0 rdoctest/reggae.rdoctest
View
@@ -9,3 +9,6 @@ Rake::TestTask.new(:test) do |t|
t.test_files=FileList['test/*_tests.rb']
end
+Rake::TestTask.new(:unit) do |t|
+ t.test_files=FileList['test/*_unit.rb']
+end
View
7 TODO
@@ -1,17 +1,14 @@
1.0
+- complete switchover to rubydoctest
- joint dependencies
-- ORM as a Joint??
- rename client to sth like output
- move all output there
-- look into class methods for sequel rest properties
- - authenticate/authorize as well???
-- improve testing coverage
- - switch to minitest???
- fix JS
- improve documentation - esp API
- ditch Sequel dependency
+ - ORM as a Joint??
- automate sequel plugin loading in options
-----------------
View
@@ -35,7 +35,7 @@ def initialize(*args)
@contents=self[2 .. -1]
self.class.mk_prop_methods
else
- replace(map {|r| Reggae.new(r).to_resource})
+ replace(map {|r| r.class==Array ? Reggae.new(r).to_resource : r})
end
end
def is_resource?
View
@@ -0,0 +1,21 @@
+
+The Reggae class generates and parses Reggae JSON arrays. See reggae.ebnf for the syntax
+
+doctest_require:"../lib/marley/utils.rb"
+doctest_require:"../lib/marley/reggae.rb"
+
+doctest: non-Reggae arrays left as is
+
+>> include Marley
+=> Object
+>> Reggae.new []
+=> []
+>> Reggae.new ['asdf','ssss']
+=> ["asdf", "ssss"]
+>> Reggae.new(['asdf','ssss']).class
+=> Marley::Reggae
+
+
+doctest: simple Reggae array
+
+

0 comments on commit 85d6cce

Please sign in to comment.