Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

start move to rubydoctest.

  • Loading branch information...
commit 85d6cce3300a79af388d70e6aabe44ca2cdf126b 1 parent 4e4f727
@herbdaily authored
View
3  Rakefile
@@ -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
2  lib/marley/reggae.rb
@@ -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
21 rdoctest/reggae.rdoctest
@@ -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
+
+
Please sign in to comment.
Something went wrong with that request. Please try again.