Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add spec that checks ys config to anonymous_spec

  • Loading branch information...
commit 44c61244681e7c1d02166a71a778729b43408681 1 parent f1b0e3f
@maiha maiha authored
Showing with 13 additions and 2 deletions.
  1. +3 −2 lib/dm-ys/base.rb
  2. +10 −0 spec/anonymous_spec.rb
View
5 lib/dm-ys/base.rb
@@ -29,10 +29,11 @@ def self.descendants
# @api public
def self.[](uri)
- klass = Class.new do
+ klass = Class.new
+ klass.class_eval do
include DataMapper::YunkerStar
+ self.uri uri
end
- klass.uri uri
return klass
end
end
View
10 spec/anonymous_spec.rb
@@ -19,6 +19,16 @@
@ys.ancestors.should be_include(DataMapper::YunkerStar)
end
+ it "should have ys option" do
+ @ys.should respond_to(:ys)
+ end
+
+ describe ".ys" do
+ it "should return a kind of Config" do
+ @ys.ys.should be_kind_of(DataMapper::YunkerStar::Config)
+ end
+ end
+
it "should set uri" do
@ys.uri.should == @uri
end
Please sign in to comment.
Something went wrong with that request. Please try again.