orator 0.6.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/orator/middle_ground.rb +1 -1
- data/lib/orator/version.rb +1 -1
- data/spec/middle_ground_spec.rb +10 -1
- metadata +1 -1
data/lib/orator/middle_ground.rb
CHANGED
data/lib/orator/version.rb
CHANGED
data/spec/middle_ground_spec.rb
CHANGED
@@ -3,7 +3,7 @@ describe Orator::MiddleGround do
|
|
3
3
|
# subje
|
4
4
|
#end
|
5
5
|
|
6
|
-
subject { described_class.new(double('client')) }
|
6
|
+
subject { described_class.new(double('client'), nil) }
|
7
7
|
|
8
8
|
it "should build a message" do
|
9
9
|
subject.message('some.thing', :data => 'value').should eq(
|
@@ -16,4 +16,13 @@ describe Orator::MiddleGround do
|
|
16
16
|
subject.client.should_receive(:socket).and_return(socket)
|
17
17
|
subject.send("event" => "some.thing", "data" => "value")
|
18
18
|
end
|
19
|
+
|
20
|
+
it "should maintain a context" do
|
21
|
+
expect { subject.some_undefined_method }.to raise_error(NameError)
|
22
|
+
|
23
|
+
subject.some_key = "something"
|
24
|
+
subject.some_key.should eq("something")
|
25
|
+
subject[:some_key].should be subject.table["some_key"]
|
26
|
+
subject.some_key.should be subject[:some_key]
|
27
|
+
end
|
19
28
|
end
|