auser-dslify 0.0.6 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/dslify.gemspec CHANGED
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{dslify}
5
- s.version = "0.0.6"
5
+ s.version = "0.0.7"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Ari Lerner"]
9
- s.date = %q{2009-04-28}
9
+ s.date = %q{2009-04-29}
10
10
  s.description = %q{Easily add DSL-like calls to any class}
11
11
  s.email = ["arilerner@mac.com"]
12
12
  s.extra_rdoc_files = ["History.txt", "Manifest.txt", "PostInstall.txt", "README.txt", "website/index.txt"]
@@ -2,7 +2,7 @@ module Dslify
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0 unless const_defined?("MAJOR")
4
4
  MINOR = 0 unless const_defined?("MINOR")
5
- TINY = 6 unless const_defined?("TINY")
5
+ TINY = 7 unless const_defined?("TINY")
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.') unless const_defined?("STRING")
8
8
  self
data/test/test_dslify.rb CHANGED
@@ -57,6 +57,30 @@ class QuickieTest < Test::Unit::TestCase
57
57
  end
58
58
  end
59
59
 
60
+ context "default options" do
61
+ setup do
62
+ class Bang
63
+ include Dslify
64
+ default_options(
65
+ :says => 'vmrun'
66
+ )
67
+ def initialize(opts={}, &block)
68
+ instance_eval &block if block
69
+ end
70
+ end
71
+ @bang = Bang.new
72
+ end
73
+
74
+ should "overwrite the default dsl option in instance_eval" do
75
+ @bang.says.should == "vmrun"
76
+ @bang = Bang.new do
77
+ says "snake"
78
+ end
79
+ @bang.says.should == "snake"
80
+ end
81
+ end
82
+
83
+
60
84
  context "with inheritance and classes" do
61
85
  before do
62
86
  class Pop
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: auser-dslify
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ari Lerner
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-04-28 00:00:00 -07:00
12
+ date: 2009-04-29 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency