Permalink
Browse files

add some explanations and manual test fixtures

  • Loading branch information...
1 parent 133deb6 commit cf12fb86ac8f0ff3a7eae7700c37ed03ac31ee26 @mislav committed Aug 21, 2010
Showing with 84 additions and 0 deletions.
  1. +10 −0 Rakefile
  2. +3 −0 explanations/class.md
  3. +3 −0 explanations/class_inheritance.md
  4. +57 −0 fixtures/all.rb
  5. +9 −0 fixtures/comment.rb
  6. +2 −0 fixtures/min.rb
View
@@ -1,3 +1,13 @@
+multitask :default => :spec # [:server, :livereload]
+
+task :server do
+ exec 'bundle', 'exec', 'shotgun'
+end
+
+task :livereload do
+ exec 'livereload'
+end
+
task :spec do
exec *%w[bundle exec ruby code.rb --color]
end
View
@@ -0,0 +1,3 @@
+## Class definition
+
+A class definition.
@@ -0,0 +1,3 @@
+## Class inheritance
+
+Some inheritance right here.
View
@@ -0,0 +1,57 @@
+#!/usr/bin/env ruby
+require 'date'
+
+module Kittens
+end
+
+class Klass < MegaKlass
+ CONSTANT = "value"
+
+ include Kittens
+
+ def self.create(options)
+ new(options)
+ end
+
+ class << self
+ attr_accessor :default_options
+ end
+
+ attr_accessor :options
+
+ def initialize(moo = nil, options = {})
+ super
+ @options = options
+ end
+
+ def name=(value)
+ @name = value
+ end
+
+ def forced?
+ options[:force]
+ end
+
+ def destroy!
+ # zomg
+ end
+
+ def take_block(&block)
+ block.call(options)
+ end
+
+ def explicit_return
+ return true
+ end
+
+ __LINE__
+
+ __FILE__
+
+ $:
+ $LOAD_PATH
+end
+
+__END__
+
+Extra data
View
@@ -0,0 +1,9 @@
+# foo
+bar(baz)
+
+# class comment
+class Moo
+ def initialize
+ # hello
+ end
+end
View
@@ -0,0 +1,2 @@
+a = 1
+b = a + 2

0 comments on commit cf12fb8

Please sign in to comment.