diff options
Diffstat (limited to 'spec/ruby/core/time/shared/now.rb')
-rw-r--r-- | spec/ruby/core/time/shared/now.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/ruby/core/time/shared/now.rb b/spec/ruby/core/time/shared/now.rb new file mode 100644 index 0000000000..f570aeedd2 --- /dev/null +++ b/spec/ruby/core/time/shared/now.rb @@ -0,0 +1,8 @@ +require File.expand_path('../../fixtures/classes', __FILE__) + +describe :time_now, shared: true do + it "creates a subclass instance if called on a subclass" do + TimeSpecs::SubTime.send(@method).should be_an_instance_of(TimeSpecs::SubTime) + TimeSpecs::MethodHolder.send(@method).should be_an_instance_of(Time) + end +end |