Sha256: 1d06256f4268fd1e513f5e08d5a1fc91daf5662c140e068d0b1c0e20aaebf786
Contents?: true
Size: 920 Bytes
Versions: 1
Compression:
Stored size: 920 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/spec_helper') describe Spectate::Status do before(:each) do @this = Spectate::Status.new("http://localhost:47502", '/test/foo/bar_camp', :foo => 'bar', :yoo => 'yar') end it "behaves like a hash" do @this[:foo].should == 'bar' end it "behaves like a struct" do @this.yoo.should == 'yar' end it "cannot be altered" do lambda{@this[:foo] = 5}.should raise_error end it "knows its source" do @this.source.should == '/test/foo/bar_camp' end it "knows its name" do @this.name.should == 'bar camp' end it "knows its parent" do @this.parent.should == '/test/foo' end it "knows its server" do @this.server.should == 'http://localhost:47502' end it "knows its other properties" do @this.properties.should have(2).elements @this.properties.should include(:foo, :yoo) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
spectate-0.0.0 | spec/status_spec.rb |