orator 0.6.0 → 0.6.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -11,7 +11,7 @@ module Orator
11
11
  # Provides access to the list of clients that are connected.
12
12
  #
13
13
  # @return [Set<Client>]
14
- attr_accessor :clients
14
+ attr_reader :clients
15
15
 
16
16
  # Initialize the class.
17
17
  def initialize(client, clients)
@@ -1,5 +1,5 @@
1
1
  module Orator
2
2
 
3
3
  # Version of Orator.
4
- VERSION = '0.6.0'
4
+ VERSION = '0.6.1'
5
5
  end
@@ -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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: orator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: