diff --git a/.yardopts b/.yardopts index 7512589..328ac52 100644 --- a/.yardopts +++ b/.yardopts @@ -5,3 +5,5 @@ --markup-provider=redcarpet --markup=markdown + +--main=README.md \ No newline at end of file diff --git a/README.md b/README.md index d3075de..45a6b05 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ Let's make our Ruby DSLs more docile... Let's treat an Array's methods as its own DSL: ``` ruby -Docile.dsl_eval [] do +Docile.dsl_eval([]) do push 1 push 2 pop @@ -36,7 +36,7 @@ Then you can use this same PizzaBuilder class as a DSL: ``` ruby @sauce_level = :extra -pizza = Docile.dsl_eval PizzaBuilder.new do +pizza = Docile.dsl_eval(PizzaBuilder.new) do cheese pepperoni sauce @sauce_level diff --git a/Rakefile b/Rakefile index 8d91737..c47adaf 100644 --- a/Rakefile +++ b/Rakefile @@ -1,4 +1,5 @@ require "bundler/gem_tasks" +require "rspec/core/rake_task" require "github/markup" require "redcarpet" require "yard" @@ -7,5 +8,7 @@ require "yard/rake/yardoc_task" YARD::Rake::YardocTask.new do |t| OTHER_PATHS = %w() t.files = ['lib/**/*.rb', OTHER_PATHS] - t.options = %w(--markup-provider=redcarpet --markup=markdown) + t.options = %w(--markup-provider=redcarpet --markup=markdown --main=README.md) end + +RSpec::Core::RakeTask.new