aboutsummaryrefslogtreecommitdiffstats
path: root/spec/rubyspec/core/struct/shared/accessor.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/rubyspec/core/struct/shared/accessor.rb')
-rw-r--r--spec/rubyspec/core/struct/shared/accessor.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/rubyspec/core/struct/shared/accessor.rb b/spec/rubyspec/core/struct/shared/accessor.rb
new file mode 100644
index 0000000000..dbf5e78f43
--- /dev/null
+++ b/spec/rubyspec/core/struct/shared/accessor.rb
@@ -0,0 +1,7 @@
+describe :struct_accessor, shared: true do
+ it "does not override the instance accessor method" do
+ struct = Struct.new(@method.to_sym)
+ instance = struct.new 42
+ instance.send(@method).should == 42
+ end
+end