Sha256: 01894ca25b068cf0062d6085c0f5e59e47681c7be5ef1f02d1d4212193150957

Contents?: true

Size: 850 Bytes

Versions: 1

Compression:

Stored size: 850 Bytes

Contents

require 'spec_helper'
require 'xiv_lodestone/lodestone_helper'
require 'xiv_lodestone/lodestone_server'

describe XIVLodestone::ServerStatus do
  let (:server) { XIVLodestone::ServerStatus.new }

  it 'Pull server status' do
    expect(server.nil?).not_to be
    expect(server.tonberry.nil?).not_to be
  end

  it 'method missing check' do
    expect(server.method_missing(:aegis).is_a?(XIVLodestone::ServerStatus::Server)).to eql(true)
  end

  it 'updating server information' do
    server.fetch_server_status(Nokogiri::HTML(open(SERVER_FILE)))
    expect(server.tonberry.status).to eq("Offline")
  end

  it 'build a server' do
    s = XIVLodestone::ServerStatus::Server.new("Hello", "World", "Yay")
    expect(s.name).to eq("Hello")
    expect(s.status).to eq("World")
    expect(s.registration).to eq("Yay")
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
xiv_lodestone-0.0.7 spec/xiv_lodestone_server_spec.rb