Sha256: 0371ae2b260e289f847dc5d313f32d4aa988976e68f699e9b38d08a5a8729531

Contents?: true

Size: 951 Bytes

Versions: 3

Compression:

Stored size: 951 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')

describe "Gom::SensorPorts" do

  before :each do
    $gom = Gom::Remote.connection = Object.new
    (Gom::Remote::Connection.stub! :new).and_return $gom
    ($gom.stub! :read).with('/gom/sensor-ports.json').and_return(<<-JSON)
      {
        "node": {
          "uri": "/services/viko/work",
          "mtime": "2010-01-06T15:14:57+01:00",
          "ctime": "2010-01-06T15:14:57+01:00",
          "entries": [
            { "attribute": {
              "name": "status",
              "node": "/services/viko/work",
              "value": "<void>",
              "type": "string",
              "mtime": "2010-01-07T19:30:36+01:00",
              "ctime": "2010-01-07T19:30:36+01:00"
            } }
          ]
        }
      }
    JSON
  end

  it "should dump status" do 
    station = Gom::SensorPorts.new '/gom/sensor-ports'
    station.status.should_not == nil
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
gom-sensor-ports-0.1.2 spec/gom-sensor-ports/sensor-ports_spec.rb
gom-sensor-ports-0.1.1 spec/gom-sensor-ports/sensor-ports_spec.rb
gom-sensor-ports-0.0.0 spec/gom-sensor-ports/sensor-ports_spec.rb