Sha256: 39f03e958425466ba92b51b46c2282d53dccda47801bb4fdf80cf1898eb8b827

Contents?: true

Size: 551 Bytes

Versions: 2

Compression:

Stored size: 551 Bytes

Contents

require 'spec_helper'
require 'hibachi/model'

module Hibachi
  describe Model do
    subject do
      MockSetting.new name: 'example', is_active: false
    end

    it "sets attributes" do
      expect(subject.attributes).to_not be_empty
      expect(subject.attributes[:name]).to eq(subject.name)
    end

    it "finds full node json" do
      expect(MockSetting.node).to be_a Node
    end

    it "converts to json" do
      expect(subject.to_json).to_not be_empty
      expect(subject.to_json).to eq(subject.attributes.to_json)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
hibachi-0.0.1 spec/hibachi/model_spec.rb
hibachi-0.0.1.pre spec/hibachi/model_spec.rb