aboutsummaryrefslogtreecommitdiffstats
path: root/spec/algebra/unit/session
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2010-07-20 15:00:36 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2010-07-20 15:00:36 -0700
commit703571f7e0bebb3d2bd43a7af5976ad4565ac2cb (patch)
tree9bb33c0fc5c1fbd62b3457aa8c45726a59881a89 /spec/algebra/unit/session
parent692566733e4442947c6b6faa2f5a1b13940744d0 (diff)
downloadrails-703571f7e0bebb3d2bd43a7af5976ad4565ac2cb.tar.gz
rails-703571f7e0bebb3d2bd43a7af5976ad4565ac2cb.tar.bz2
rails-703571f7e0bebb3d2bd43a7af5976ad4565ac2cb.zip
use Session.instance rather than Session.new for easier code
Diffstat (limited to 'spec/algebra/unit/session')
-rw-r--r--spec/algebra/unit/session/session_spec.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/algebra/unit/session/session_spec.rb b/spec/algebra/unit/session/session_spec.rb
index 0553a140ec..421e3e3637 100644
--- a/spec/algebra/unit/session/session_spec.rb
+++ b/spec/algebra/unit/session/session_spec.rb
@@ -10,16 +10,16 @@ module Arel
describe '::start' do
describe '::instance' do
it "it is a singleton within the started session" do
- Session.start do
- Session.new.should == Session.new
+ Session.start do |session|
+ Session.instance.should == session
end
end
it "is a singleton across nested sessions" do
- Session.start do
- outside = Session.new
- Session.start do
- Session.new.should == outside
+ Session.start do |s1|
+ outside = Session.instance
+ Session.start do |s2|
+ Session.instance.should == outside
end
end
end