Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add specs for Maglev#root, #[] and #[]=

  • Loading branch information...
commit a071dd45690785a3592cf9c878c2aaf150b5d9e4 1 parent f01e988
@johnnyt johnnyt authored
Showing with 26 additions and 0 deletions.
  1. +26 −0 spec/maglev/maglev_spec.rb
View
26 spec/maglev/maglev_spec.rb
@@ -0,0 +1,26 @@
+require File.expand_path '../../spec_helper', __FILE__
+
+describe 'Maglev' do
+
+ describe '#root' do
+ it 'references Maglev::PERSISTENT_ROOT' do
+ Maglev.root.should == Maglev::PERSISTENT_ROOT
+ end
+ end
+
+ describe '#[]' do
+ it 'updates Maglev::PERSISTENT_ROOT' do
+ message = 'hello world'
+ Maglev::PERSISTENT_ROOT[:message] = message
+ Maglev[:message].should == message
+ end
+ end
+
+ describe '#[]=' do
+ it 'updates Maglev::PERSISTENT_ROOT' do
+ Maglev[:message] = 'hello world'
+ Maglev[:message].should == Maglev::PERSISTENT_ROOT[:message]
+ end
+ end
+
+end
Please sign in to comment.
Something went wrong with that request. Please try again.