summaryrefslogtreecommitdiff
path: root/spec/ruby/core/set/constructor_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/set/constructor_spec.rb')
-rw-r--r--spec/ruby/core/set/constructor_spec.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/ruby/core/set/constructor_spec.rb b/spec/ruby/core/set/constructor_spec.rb
new file mode 100644
index 0000000000..11138f3a5b
--- /dev/null
+++ b/spec/ruby/core/set/constructor_spec.rb
@@ -0,0 +1,14 @@
+require_relative '../../spec_helper'
+
+describe "Set[]" do
+ it "returns a new Set populated with the passed Objects" do
+ set = Set[1, 2, 3]
+
+ set.instance_of?(Set).should == true
+ set.size.should.eql?(3)
+
+ set.should.include?(1)
+ set.should.include?(2)
+ set.should.include?(3)
+ end
+end